Package cc.plural.jsonij

Examples of cc.plural.jsonij.Value.toJSON()


    @Test
    public void testMarshalJSONArrayCharSequence() throws JSONMarshalerException, IOException, ParserException {
        System.out.println("testMarshalJSONArrayCharSequence");
        String inputJSONDocument = "[\"\",\"Rah\",\"Blah Blah Blah Blah\"]";
        Value inputValue = JSON.parseValue(inputJSONDocument);
        System.out.println(String.format("InputJSON: %s", inputValue.toJSON()));
        Object marshal = JSONMarshaler.marshalJSON(inputValue, CharSequence[].class);
        System.out.println(String.format("MarshaledObjectToString: %s", marshal));
        Value outputValue = JSONMarshaler.marshalObjectToValue(marshal);
        System.out.println(String.format("OutputJSON: %s", outputValue));
        assertNotNull(marshal);
View Full Code Here


    @Test
    public void testMarshalJSONArrayArray() throws JSONMarshalerException, IOException, ParserException {
        System.out.println("testMarshalJSONArrayCharSequence");
        String inputJSONDocument = "[\"blah\",[1,2,3,4]]";
        Value inputValue = JSON.parseValue(inputJSONDocument);
        System.out.println(String.format("InputJSON: %s", inputValue.toJSON()));
        Object marshal = JSONMarshaler.marshalJSON(inputValue, Object[].class);
        System.out.println(String.format("MarshaledObjectToString: %s", marshal));
        Value outputValue = JSONMarshaler.marshalObjectToValue(marshal);
        System.out.println(String.format("OutputJSON: %s", outputValue));
        assertNotNull(marshal);
View Full Code Here

    public void testMarshalJSONString1() throws JSONMarshalerException, IOException, ParserException {
        System.out.println("testMarshalJSONString1");
        String inputJSONDocument = "\"JSON String 1\"";

        Value inputValue = JSON.parseValue(inputJSONDocument);
        System.out.println(String.format("InputJSON: %s", inputValue.toJSON()));
        Object marshal = JSONMarshaler.marshalJSON(inputValue, String.class);
        System.out.println(String.format("MarshaledObjectToString: %s", marshal));
        Value outputValue = JSONMarshaler.marshalObjectToValue(marshal);
        System.out.println(String.format("OutputJSON: %s", outputValue));
View Full Code Here

    public void testMarshalJSONString2() throws JSONMarshalerException, IOException, ParserException {
        System.out.println("testMarshalJSONString2");
        String inputJSONDocument = "\"Surrogate Pairs: \\ud801\\udc01\"";

        Value inputValue = JSON.parseValue(inputJSONDocument);
        System.out.println(String.format("InputJSON: %s", inputValue.toJSON()));
        Object marshal = JSONMarshaler.marshalJSON(inputValue, String.class);
        System.out.println(String.format("MarshaledObjectToString: %s", marshal));
        Value outputValue = JSONMarshaler.marshalObjectToValue(marshal);
        System.out.println(String.format("OutputJSON: %s", outputValue));
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.