@Test public void implementationSpecificEqualsBehavior() { assertTrue( JSON.equals("{\"a\": 9223372036854775807}", "{\"a\": 9223372036854775807}")); assertRuntimeException(() -> JSON.equals("{\"a\": 9223372036854775808}", "{\"a\": 9223372036854775808}")); assertTrue(JSON.equals("{\"a\": 2.7976931348623158e+308}", "{\"a\": 2.7976931348623158e+308}")); assertTrue(JSON.equals( "{\"e\": 2.7182818284590452354}", "{\"e\": 2.7182818284590452354}")); assertTrue(JSON.equals( "{\"e\": 2.7182818284590452354}", "{\"e\": 2.7182818284590452355}")); assertFalse(JSON.equals("{\"e\": 2.7182818284590452354}", "{\"e\": 2.71828182845904}")); assertFalse(JSON.equals("{\"a\": 1.0}", "{\"a\":1}")); assertTrue(JSON.equals("{\"a\": 1.0}", "{\"a\":1.00}")); assertTrue(JSON.equals("{\"a\": 1.0}", "{\"a\":1.0000000000000000000000000000}")); assertTrue(JSON.equals("{\"a\": 10.0}", "{\"a\":1e1}")); assertTrue(JSON.equals("{\"a\": 1.2}", "{\"a\":12e-1}")); }
public static boolean equals(String left, String right) { Slime leftSlime = SlimeUtils.jsonToSlimeOrThrow(left); Slime rightSlime = SlimeUtils.jsonToSlimeOrThrow(right); return leftSlime.equalTo(rightSlime); }
JSON { public static boolean equals(String left, String right) { Slime leftSlime = SlimeUtils.jsonToSlimeOrThrow(left); Slime rightSlime = SlimeUtils.jsonToSlimeOrThrow(right); return leftSlime.equalTo(rightSlime); } }
JSON { public static boolean equals(String left, String right) { Slime leftSlime = SlimeUtils.jsonToSlimeOrThrow(left); Slime rightSlime = SlimeUtils.jsonToSlimeOrThrow(right); return leftSlime.equalTo(rightSlime); } private  JSON(); }
JSON { public static boolean equals(String left, String right) { Slime leftSlime = SlimeUtils.jsonToSlimeOrThrow(left); Slime rightSlime = SlimeUtils.jsonToSlimeOrThrow(right); return leftSlime.equalTo(rightSlime); } private  JSON(); static String encode(Map<String, ?> map); static String escape(String s); static boolean equals(String left, String right); }
JSON { public static boolean equals(String left, String right) { Slime leftSlime = SlimeUtils.jsonToSlimeOrThrow(left); Slime rightSlime = SlimeUtils.jsonToSlimeOrThrow(right); return leftSlime.equalTo(rightSlime); } private  JSON(); static String encode(Map<String, ?> map); static String escape(String s); static boolean equals(String left, String right);  }