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
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
Modifier and TypeMethodDescriptionserializeAsArray
(String... arrays) Add element names to be treated as arrays.serializeAsArray
(List<String> arrays) Add element names to be treated as arrays.xml2JsonNs
(Map<String, String> jsonXml2JsonNs) Setter for XML to JSON namespace mapping.Methods inherited from class org.glassfish.jersey.jettison.JettisonConfig.Builder
build
-
Method Details
-
xml2JsonNs
Setter for XML to JSON namespace mapping. This property is valid for theJettisonConfig.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
Add element names to be treated as arrays. This property is valid for theJettisonConfig.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:
arrays
- names to be serialized as arrays.- Returns:
- updated builder instance.
-
serializeAsArray
Add element names to be treated as arrays. This property is valid for theJettisonConfig.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:
arrays
- of element names to be serialized as arrays.- Returns:
- updated builder instance.
-