Package org.codehaus.jettison.mapped

Examples of org.codehaus.jettison.mapped.Configuration


        QName qname = actualClass == Document.class ? null : getQName(actualClass, genericType, actualObject);
        if (qname != null && ignoreNamespaces && (isCollection  || dropRootNeeded)) {       
            qname = new QName(qname.getLocalPart());
        }
       
        Configuration config =
            JSONUtils.createConfiguration(namespaceMap,
                                          writeXsiType && !ignoreNamespaces,
                                          attributesToElements,
                                          typeConverter);
       
View Full Code Here


            return JSONUtils.createBadgerFishWriter(os);
        }
       
        QName qname = getQName(actualClass, genericType, actualObject, true);
       
        Configuration config =
            JSONUtils.createConfiguration(namespaceMap,
                                          writeXsiType && !ignoreNamespaces,
                                          attributesToElements,
                                          typeConverter);
       
View Full Code Here

                                                    boolean attributesAsElements,
                                                    TypeConverter converter) {
        if (writeXsiType) {
            namespaceMap.putIfAbsent(XSI_URI, XSI_PREFIX);
        }
        Configuration c = new Configuration(namespaceMap);
        c.setSupressAtAttributes(attributesAsElements);
        if (converter != null) {
            c.setTypeConverter(converter);
        }
        return c;
    }
View Full Code Here

        }
        if (BADGER_FISH_CONVENTION.equals(convention)) {
            return JSONUtils.createBadgerFishWriter(os);
        }
       
        Configuration config =
            JSONUtils.createConfiguration(namespaceMap,
                                          writeXsiType && !ignoreNamespaces,
                                          attributesToElements,
                                          typeConverter);
       
View Full Code Here

                                                    boolean attributesAsElements,
                                                    TypeConverter converter) {
        if (writeXsiType) {
            namespaceMap.putIfAbsent(XSI_URI, XSI_PREFIX);
        }
        Configuration c = new Configuration(namespaceMap);
        c.setSupressAtAttributes(attributesAsElements);
        if (converter != null) {
            c.setTypeConverter(converter);
        }
        return c;
    }
View Full Code Here

            return JSONUtils.createBadgerFishWriter(os);
        }
       
        QName qname = getQName(actualClass, genericType, actualObject, true);
       
        Configuration config =
            JSONUtils.createConfiguration(namespaceMap,
                                          writeXsiType && !ignoreNamespaces,
                                          attributesToElements,
                                          typeConverter);
       
View Full Code Here

            return JSONUtils.createBadgerFishWriter(os);
        }
       
        QName qname = getQName(actualClass, genericType, actualObject, true);
       
        Configuration config =
            JSONUtils.createConfiguration(namespaceMap, writeXsiType && !ignoreNamespaces, typeConverter);
       
        XMLStreamWriter writer = JSONUtils.createStreamWriter(os, qname,
             writeXsiType && !ignoreNamespaces, config, serializeAsArray, arrayKeys,
             isCollection || dropRootElement);
View Full Code Here

        String result = xstream.toXML(product);
        assertEquals(SIMPLE, result);
    }

    public void testReadConfigured() {
        Configuration config = new Configuration();
        // TODO: Configure something useful (see XSTR-540)
        xstream = new XStream(new JettisonMappedXmlDriver(config));
        xstream.alias("product", Product.class);
        Product product = (Product)xstream.fromXML(SIMPLE);
        assertEquals(product.getName(), "Banana");
View Full Code Here

        assertEquals(product.getId(), "123");
        assertEquals("" + product.getPrice(), "" + 23.00);
    }

    public void testWriteConfigured() {
        Configuration config = new Configuration();
        // TODO: Configure something useful (see XSTR-540)
        xstream = new XStream(new JettisonMappedXmlDriver(config));
        xstream.alias("product", Product.class);
        Product product = new Product("Banana", "123", 23.00);
        String result = xstream.toXML(product);
View Full Code Here

    private final MappedXMLInputFactory mif;
    private final MappedNamespaceConvention convention;
    private boolean useSerializeAsArray = true;

    public JettisonMappedXmlDriver() {
        this(new Configuration(), true);
    }
View Full Code Here

TOP

Related Classes of org.codehaus.jettison.mapped.Configuration

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.