Package com.alibaba.fastjson

Examples of com.alibaba.fastjson.JSONObject.clear()


        Assert.assertEquals(2, json.values().size());
        Assert.assertEquals(new BigDecimal("53"), json.getBigDecimal("A"));

        json.putAll(Collections.singletonMap("E", 99));
        Assert.assertEquals(3, json.values().size());
        json.clear();
        Assert.assertEquals(0, json.values().size());
        json.putAll(Collections.singletonMap("E", 99));
        Assert.assertEquals(99L, json.getLongValue("E"));
        Assert.assertEquals(99, json.getIntValue("E"));
        Assert.assertEquals("99", json.getString("E"));
View Full Code Here


        Assert.assertEquals(2, json.values().size());
        Assert.assertEquals(new BigDecimal("53"), json.getBigDecimal("A"));

        json.putAll(Collections.singletonMap("E", 99));
        Assert.assertEquals(3, json.values().size());
        json.clear();
        Assert.assertEquals(0, json.values().size());
        json.putAll(Collections.singletonMap("E", 99));
        Assert.assertEquals(99L, json.getLongValue("E"));
        Assert.assertEquals(99, json.getIntValue("E"));
        Assert.assertEquals("99", json.getString("E"));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.