Package com.alibaba.fastjson

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


        Assert.assertEquals(true, json.isEmpty());
        json.put("C", 51L);
        json.put("B", 52);
        json.put("A", 53);
        Assert.assertEquals(false, json.isEmpty());
        Assert.assertEquals(true, json.containsKey("C"));
        Assert.assertEquals(false, json.containsKey("D"));
        Assert.assertEquals(true, json.containsValue(52));
        Assert.assertEquals(false, json.containsValue(33));
        Assert.assertEquals(null, json.remove("D"));
        Assert.assertEquals(51L, json.remove("C"));
View Full Code Here


        json.put("C", 51L);
        json.put("B", 52);
        json.put("A", 53);
        Assert.assertEquals(false, json.isEmpty());
        Assert.assertEquals(true, json.containsKey("C"));
        Assert.assertEquals(false, json.containsKey("D"));
        Assert.assertEquals(true, json.containsValue(52));
        Assert.assertEquals(false, json.containsValue(33));
        Assert.assertEquals(null, json.remove("D"));
        Assert.assertEquals(51L, json.remove("C"));
        Assert.assertEquals(2, json.keySet().size());
View Full Code Here

        Assert.assertEquals(true, json.isEmpty());
        json.put("C", 51L);
        json.put("B", 52);
        json.put("A", 53);
        Assert.assertEquals(false, json.isEmpty());
        Assert.assertEquals(true, json.containsKey("C"));
        Assert.assertEquals(false, json.containsKey("D"));
        Assert.assertEquals(true, json.containsValue(52));
        Assert.assertEquals(false, json.containsValue(33));
        Assert.assertEquals(null, json.remove("D"));
        Assert.assertEquals(51L, json.remove("C"));
View Full Code Here

        json.put("C", 51L);
        json.put("B", 52);
        json.put("A", 53);
        Assert.assertEquals(false, json.isEmpty());
        Assert.assertEquals(true, json.containsKey("C"));
        Assert.assertEquals(false, json.containsKey("D"));
        Assert.assertEquals(true, json.containsValue(52));
        Assert.assertEquals(false, json.containsValue(33));
        Assert.assertEquals(null, json.remove("D"));
        Assert.assertEquals(51L, json.remove("C"));
        Assert.assertEquals(2, json.keySet().size());
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.