Package org.glassfish.jersey.jettison
Class JettisonConfig.MappedJettisonBuilder
- java.lang.Object
-
- org.glassfish.jersey.jettison.JettisonConfig.Builder
-
- org.glassfish.jersey.jettison.JettisonConfig.MappedJettisonBuilder
-
- Enclosing class:
- JettisonConfig
public static class JettisonConfig.MappedJettisonBuilder extends JettisonConfig.Builder
Builder class for constructingJettisonConfigoptions for theJettisonConfig.Notation.MAPPED_JETTISONconvention.
-
-
Field Summary
-
Fields inherited from class org.glassfish.jersey.jettison.JettisonConfig.Builder
jsonXml2JsonNs, serializeAsArray
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JettisonConfig.MappedJettisonBuilderserializeAsArray(String... arrays)Add element names to be treated as arrays.JettisonConfig.MappedJettisonBuilderserializeAsArray(List<String> arrays)Add element names to be treated as arrays.JettisonConfig.MappedJettisonBuilderxml2JsonNs(Map<String,String> jsonXml2JsonNs)Setter for XML to JSON namespace mapping.-
Methods inherited from class org.glassfish.jersey.jettison.JettisonConfig.Builder
build
-
-
-
-
Method Detail
-
xml2JsonNs
public JettisonConfig.MappedJettisonBuilder xml2JsonNs(Map<String,String> jsonXml2JsonNs)
Setter for XML to JSON namespace mapping. This property is valid for theJettisonConfig.Notation.MAPPED_JETTISONnotation 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 theJettisonConfig.Notation.MAPPED_JETTISONnotation 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:
arrays- 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 theJettisonConfig.Notation.MAPPED_JETTISONnotation 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:
arrays- of element names to be serialized as arrays.- Returns:
- updated builder instance.
-
-