Package com.github.jsonj

Examples of com.github.jsonj.JsonObject


        Assert.assertNotNull(domNode);
        Assert.assertEquals(domNode.getElementsByTagName("sample").getLength(), 1);
    }

    public void shouldGetW3cDomTreeWithDefaultRoot() {
        JsonObject sampleJson = sampleJson();
        org.w3c.dom.Document domNode = JsonXmlConverter.getW3cDocument(sampleJson, "root");
        Assert.assertNotNull(domNode);
        Assert.assertEquals(domNode.getElementsByTagName("root").getLength(), 1);
    }
View Full Code Here


        Assert.assertNotNull(domNode);
        Assert.assertEquals(domNode.getElementsByTagName("root").getLength(), 1);
    }

    private JsonObject sampleJson() {
        JsonObject object = object().put("foo", "bar").put("bar", array("foo","bar")).put("foobar", object().put("1", 1).put("2", 2).get()).put("escapeme", "><").get();
        return object;
    }
View Full Code Here

TOP

Related Classes of com.github.jsonj.JsonObject

Copyright © 2018 www.massapicom. 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.