This commit is contained in:
Looly 2020-04-17 17:33:22 +08:00
parent 2f9fa2c29a
commit 9c3bf7b6ca

View File

@ -124,6 +124,14 @@ public class JSONObjectTest {
Assert.assertEquals("体”、“文", json.getStr("test"));
}
@Test
public void parseStringTest4() {
String jsonStr = "{'msg':'这里还没有内容','data':{'cards':[]},'ok':0}";
JSONObject json = new JSONObject(jsonStr);
Assert.assertEquals(new Integer(0), json.getInt("ok"));
Assert.assertEquals(new JSONArray(), json.getJSONObject("data").getJSONArray("cards"));
}
@Test
@Ignore
public void parseStringWithBomTest() {