Package de.odysseus.staxon.json

Examples of de.odysseus.staxon.json.JsonXMLConfigBuilder


    private String getJSONWorkflowGraph(String workflowGraphXML) throws XMLStreamException, IOException {
        String workflowGraphJSON;
        ByteArrayOutputStream output = new ByteArrayOutputStream();
        ByteArrayInputStream input = new ByteArrayInputStream(workflowGraphXML.getBytes());
        try {
            JsonXMLConfig config = new JsonXMLConfigBuilder()
                    .autoArray(true)
                    .autoPrimitive(true)
                    .prettyPrint(true)
                    .build();
            XMLEventReader reader = XMLInputFactory.newInstance().
View Full Code Here


    @Override
    public void writeTo(MessageContext messageContext, OMOutputFormat omOutputFormat, OutputStream outputStream,
                        boolean preserve) throws AxisFault {
        String charSetEncoding = (String) messageContext.getProperty(Constants.Configuration.CHARACTER_SET_ENCODING);
        JsonXMLConfig config = new JsonXMLConfigBuilder()
                .autoArray(true)
                .autoPrimitive(true)
                .prettyPrint(true)
                .build();
View Full Code Here

    @Override
    public OMElement processDocument(InputStream inputStream, String s, MessageContext messageContext) throws AxisFault {
        SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
        SOAPEnvelope envelope = factory.createSOAPEnvelope();
        // configure JSON to XML conversion property
        JsonXMLConfig config = new JsonXMLConfigBuilder().multiplePI(false).prettyPrint(false).build();
        //
        try {
            String charSetEncoding = (String) messageContext.getProperty(Constants.Configuration.CHARACTER_SET_ENCODING);
            XMLStreamReader reader = new JsonXMLInputFactory(config).createXMLStreamReader(inputStream, charSetEncoding);
            StAXOMBuilder stAXOMBuilder = new StAXOMBuilder(reader);
View Full Code Here

    }
    return map;
  }
 
  private JsonXMLConfig toJsonXMLConfig(Class<?> type, JsonXML config) throws JAXBException {
    return new JsonXMLConfigBuilder().
        autoArray(config.autoArray()).
        autoPrimitive(config.autoPrimitive()).
        multiplePI(true).
        namespaceDeclarations(config.namespaceDeclarations()).
        namespaceSeparator(config.namespaceSeparator()).
View Full Code Here

TOP

Related Classes of de.odysseus.staxon.json.JsonXMLConfigBuilder

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.