Package flexjson.transformer

Examples of flexjson.transformer.StateTransformer


    @Test
    public void testDeepSerializePersonWithRootName() {
        Person person = buildPerson1();

        JSONSerializer serializer = new JSONSerializer()
                .transform(new StateTransformer(), State.class)
                .exclude("loopClassOnes.loopClassTwo.loopClassOne")
                .rootName("myRootName");

        String string = serializer.deepSerialize(person);
        logger.info(string);
View Full Code Here


        StringWriter writer = new StringWriter();


        JSONSerializer serializer =
                new JSONSerializer()
                        .transform(new StateTransformer(), State.class)
                        .exclude("loopClassOnes.loopClassTwo.loopClassOne")
                        .rootName("myRootName");

        serializer.deepSerialize(person, writer);
        String string = writer.toString();
View Full Code Here

        StringWriter writer = new StringWriter();


        JSONSerializer serializer =
                new JSONSerializer()
                        .transform(new StateTransformer(), State.class)
                        .transform(new StringArrayTransformer(), String[].class)
                        .exclude("loopClassOnes.loopClassTwo.loopClassOne")
                        .rootName("myRootName")
                        .prettyPrint(true);
View Full Code Here

TOP

Related Classes of flexjson.transformer.StateTransformer

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.