public class JettisonConfig extends Object
JettisonConfig
instance can be used for configuring the JSON notation on JettisonJaxbContext
.Modifier and Type | Class and Description |
---|---|
static class |
JettisonConfig.Builder
Builder class for constructing
JettisonConfig options |
static class |
JettisonConfig.MappedJettisonBuilder
Builder class for constructing
JettisonConfig options
for the JettisonConfig.Notation.MAPPED_JETTISON convention. |
static class |
JettisonConfig.Notation
Enumeration of supported JSON notations.
|
Modifier and Type | Field and Description |
---|---|
static JettisonConfig |
DEFAULT
The default
JettisonConfig uses JettisonConfig.Notation.MAPPED_JETTISON
notation with root unwrapping option set to true. |
Modifier and Type | Method and Description |
---|---|
static JettisonConfig.Builder |
badgerFish()
A static method for obtaining a builder of
JettisonConfig instance, which will use JettisonConfig.Notation.BADGERFISH JSON notation. |
static JettisonConfig.Builder |
copyBuilder(JettisonConfig jc) |
static JettisonConfig |
createJSONConfiguration(JettisonConfig c)
A static method for obtaining
JettisonConfig instance with humanReadableFormatting
set according to formatted parameter. |
List<String> |
getArrayElements()
Returns a list of elements to be treated as arrays.
|
JettisonConfig.Notation |
getNotation()
Returns JSON notation selected for this configuration
|
Map<String,String> |
getXml2JsonNs()
Returns a map for XML to JSON namespace mapping
This property is valid for the
JettisonConfig.Notation.MAPPED_JETTISON
notation only. |
static JettisonConfig.MappedJettisonBuilder |
mappedJettison()
A static method for obtaining a builder of
JettisonConfig instance, which will use JettisonConfig.Notation.MAPPED_JETTISON JSON notation. |
String |
toString() |
public static final JettisonConfig DEFAULT
JettisonConfig
uses JettisonConfig.Notation.MAPPED_JETTISON
notation with root unwrapping option set to true.public static JettisonConfig createJSONConfiguration(JettisonConfig c) throws IllegalArgumentException
JettisonConfig
instance with humanReadableFormatting
set according to formatted parameter.c
- original instance of JettisonConfig
, can't be nullJettisonConfig
with humanReadableFormatting set to formatted.IllegalArgumentException
- when provided JettisonConfig
is null.public static JettisonConfig.MappedJettisonBuilder mappedJettison()
JettisonConfig
instance, which will use JettisonConfig.Notation.MAPPED_JETTISON
JSON notation.
After getting the builder, you can set configuration options on it and finally get an immutable JettisonConfig
instance using the JettisonConfig.Builder.build()
method.JettisonConfig
instancepublic static JettisonConfig.Builder badgerFish()
JettisonConfig
instance, which will use JettisonConfig.Notation.BADGERFISH
JSON notation.
After getting the builder, you can set configuration options on it and finally get an immutable JettisonConfig
instance using the JettisonConfig.Builder.build()
method.JettisonConfig
instancepublic static JettisonConfig.Builder copyBuilder(JettisonConfig jc)
public JettisonConfig.Notation getNotation()
public Map<String,String> getXml2JsonNs()
JettisonConfig.Notation.MAPPED_JETTISON
notation only.JettisonConfig.MappedJettisonBuilder.xml2JsonNs(java.util.Map)
public List<String> getArrayElements()
JettisonConfig.Notation.MAPPED_JETTISON
notation only.JettisonConfig.MappedJettisonBuilder.serializeAsArray(java.util.List)
Copyright © 2007-2015, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.