Package com.sun.jersey.api.json.JSONConfiguration

Examples of com.sun.jersey.api.json.JSONConfiguration.MappedBuilder


        Collection<String> nonStringElements = new LinkedList<String>();
        Collection<String> attrAsElements = new LinkedList<String>();
        addStringsToCollection(arrays, arrayElements);
        addStringsToCollection(nonStrings, nonStringElements);
        addStringsToCollection(attrAsElems, attrAsElements);
        final MappedBuilder configBuilder = JSONConfiguration.mapped().rootUnwrapping(stripRoot);
        for (String array : arrayElements) {
            configBuilder.arrays(array);
        }
        for (String nonString : nonStringElements) {
            configBuilder.nonStrings(nonString);
        }
        for (String attrAsElem : attrAsElements) {
            configBuilder.attributeAsElement(attrAsElem);
        }
        JSONConfiguration config = configBuilder.build();
        tryWritingBean(jaxbBean, filename, config);
        tryReadingBean(filename, jaxbBean, config);
    }
View Full Code Here


        Collection<String> nonStringElements = new LinkedList<String>();
        Collection<String> attrAsElements = new LinkedList<String>();
        addStringsToCollection(arrays, arrayElements);
        addStringsToCollection(nonStrings, nonStringElements);
        addStringsToCollection(attrAsElems, attrAsElements);
        final MappedBuilder configBuilder = JSONConfiguration.mapped().rootUnwrapping(stripRoot);
        for (String array : arrayElements) {
            configBuilder.arrays(array);
        }
        for (String nonString : nonStringElements) {
            configBuilder.nonStrings(nonString);
        }
        for (String attrAsElem : attrAsElements) {
            configBuilder.attributeAsElement(attrAsElem);
        }
        JSONConfiguration config = configBuilder.build();
        tryWritingBean(jaxbBean, filename, config);
        tryReadingBean(filename, jaxbBean, config);
    }
View Full Code Here

TOP

Related Classes of com.sun.jersey.api.json.JSONConfiguration.MappedBuilder

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.