Examples of writeJSonObject()


Examples of org.nustaq.kson.Kson.writeJSonObject()

        System.out.println(res);

        Object reRead = kk.readObject(res);
        Assert.assertTrue(DeepEquals.deepEquals(result, reRead));

        res = kk.writeJSonObject(result, true);
        System.out.println(res);

    }

    @Test
View Full Code Here

Examples of org.nustaq.kson.Kson.writeJSonObject()

            .map("test", SomePojoConfig.class)
            .map("pojo", PojoConfigItem.class)
            .map("other", OtherPojoConfigItem.class);
        SomePojoConfig result = (SomePojoConfig) kk.readObject( new File("./src/test/kson/test.json"), "test" );

        String res = kk.writeJSonObject(result,true);
        System.out.println(res);
        Object reRead = kk.readObject(res);
        Assert.assertTrue(DeepEquals.deepEquals(result,reRead));
    }
View Full Code Here

Examples of org.nustaq.kson.Kson.writeJSonObject()

        cust.getPhoneNumbers().add(new KsonPhoneNumber("home", "345 34592-0"));
        cust.getPhoneNumbers().add(new KsonPhoneNumber("work", "345 34592-1"));

        Kson kk = new Kson().map("customer", KsonCustomer.class).map("phone", KsonPhoneNumber.class);
        System.out.println(kk.writeObject(cust));
        System.out.println(kk.writeJSonObject(cust, false));

    }

    @Test
    public void testBasics() throws Exception {
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.