Assert.assertEquals(res, basicRes);
}
}
public void test_1() throws Exception {
JSONObject res = new JSONObject();
res.put("a", 1);
res.put("b", 2);
res.put("c", 3);
String[] tests = { "{ 'a':1, 'b':2, 'c':3 }", "{ 'a':1,,'b':2, 'c':3 }", "{,'a':1, 'b':2, 'c':3 }", "{'a':1, 'b':2, 'c':3,,}",
"{,,'a':1,,,,'b':2,'c':3,,,,,}", };
for (String t : tests) {
DefaultExtJSONParser ext = new DefaultExtJSONParser(t);
ext.config(Feature.AllowArbitraryCommas, true);
JSONObject extRes = ext.parseObject();
Assert.assertEquals(res.toString(), extRes.toString());
DefaultJSONParser basic = new DefaultJSONParser(t);
basic.config(Feature.AllowArbitraryCommas, true);
JSONObject basicRes = basic.parseObject();
Assert.assertEquals(res.toString(), basicRes.toString());
}
}