mirror of
https://github.com/stleary/JSON-java.git
synced 2025-08-03 11:25:30 -04:00
Merge pull request #76 from johnjaylward/WriteJavadocUpdate
Update test for issue https://github.com/stleary/JSON-java/issues/356
This commit is contained in:
commit
1aeadd1765
@ -1622,10 +1622,13 @@ public class JSONObjectTest {
|
||||
" ]\n" +
|
||||
"}";
|
||||
JSONObject jsonObject = new JSONObject(jsonObject0Str);
|
||||
assertEquals(jsonObject0Str, jsonObject.toString());
|
||||
assertEquals(jsonObject0Str, jsonObject.toString(0));
|
||||
assertEquals(jsonObject1Str, jsonObject.toString(1));
|
||||
assertEquals(jsonObject4Str, jsonObject.toString(4));
|
||||
assertEquals("toString()",jsonObject0Str, jsonObject.toString());
|
||||
assertEquals("toString(0)",jsonObject0Str, jsonObject.toString(0));
|
||||
assertEquals("toString(1)",jsonObject1Str, jsonObject.toString(1));
|
||||
assertEquals("toString(4)",jsonObject4Str, jsonObject.toString(4));
|
||||
|
||||
JSONObject jo = new JSONObject().put("TABLE", new JSONObject().put("yhoo", new JSONObject()));
|
||||
assertEquals("toString(2)","{\"TABLE\": {\"yhoo\": {}}}", jo.toString(2));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user