org.glassfish.jersey.jettison
Class JettisonConfig.MappedJettisonBuilder

java.lang.Object
  extended by org.glassfish.jersey.jettison.JettisonConfig.Builder
      extended by org.glassfish.jersey.jettison.JettisonConfig.MappedJettisonBuilder
Enclosing class:
JettisonConfig

public static class JettisonConfig.MappedJettisonBuilder
extends JettisonConfig.Builder

Builder class for constructing JettisonConfig options for the JettisonConfig.Notation.MAPPED_JETTISON convention.


Field Summary
 
Fields inherited from class org.glassfish.jersey.jettison.JettisonConfig.Builder
jsonXml2JsonNs, serializeAsArray
 
Method Summary
 JettisonConfig.MappedJettisonBuilder serializeAsArray(List<String> arrays)
          Add element names to be treated as arrays.
 JettisonConfig.MappedJettisonBuilder serializeAsArray(String... arrays)
          Add element names to be treated as arrays.
 JettisonConfig.MappedJettisonBuilder xml2JsonNs(Map<String,String> jsonXml2JsonNs)
          Setter for XML to JSON namespace mapping.
 
Methods inherited from class org.glassfish.jersey.jettison.JettisonConfig.Builder
build
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

xml2JsonNs

public JettisonConfig.MappedJettisonBuilder xml2JsonNs(Map<String,String> jsonXml2JsonNs)
Setter for XML to JSON namespace mapping. This property is valid for the JettisonConfig.Notation.MAPPED_JETTISON notation only.

The value is a map with zero or more key/value pairs, where the key is an XML namespace and the value is the prefix to use as the replacement for the XML namespace.

The default value is a map with zero key/value pairs.

Parameters:
jsonXml2JsonNs - XML to JSON namespace map.
Returns:
updated builder instance.

serializeAsArray

public JettisonConfig.MappedJettisonBuilder serializeAsArray(String... arrays)
Add element names to be treated as arrays. This property is valid for the JettisonConfig.Notation.MAPPED_JETTISON notation only.

Property value is a list of element names that should be treated as arrays even if only a single item is present.

The default value is an empty list.

Parameters:
element - names to be serialized as arrays.
Returns:
updated builder instance.

serializeAsArray

public JettisonConfig.MappedJettisonBuilder serializeAsArray(List<String> arrays)
Add element names to be treated as arrays. This property is valid for the JettisonConfig.Notation.MAPPED_JETTISON notation only.

Property value is a list of element names that should be treated as arrays even if only a single item is present.

The default value is an empty list.

Parameters:
list - of element names to be serialized as arrays.
Returns:
updated builder instance.


Copyright © 2007-2013, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.