public static class JSONConfiguration.NaturalBuilder extends JSONConfiguration.Builder
JSONConfiguration
options
for the JSONConfiguration.Notation.NATURAL
convention.arrays, attrsAsElems, humanReadableFormatting, jsonXml2JsonNs, namespaceSeparator, nonStrings, rootUnwrapping, usePrefixAtNaturalAttributes
Modifier and Type | Method and Description |
---|---|
JSONConfiguration.NaturalBuilder |
humanReadableFormatting(boolean humanReadableFormatting)
If set to true, generated JSON will contain new-line characters and indentation, so that
the output is easy to read for people.
|
JSONConfiguration.NaturalBuilder |
rootUnwrapping(boolean rootUnwrapping)
Setter for XML root element unwrapping.
|
JSONConfiguration.NaturalBuilder |
usePrefixesAtNaturalAttributes()
JSON names corresponding to XML attributes will be written using a '@' prefix
This property is valid for the
JSONConfiguration.Notation.NATURAL notation only. |
build
public JSONConfiguration.NaturalBuilder rootUnwrapping(boolean rootUnwrapping)
JSONConfiguration.Notation.MAPPED
and JSONConfiguration.Notation.NATURAL
notations only.
If set to true, JSON code corresponding to the XML root element will be stripped out
The default value is false.
rootUnwrapping
- if set to true, JSON code corresponding to the
XML root element will be stripped out.public JSONConfiguration.NaturalBuilder humanReadableFormatting(boolean humanReadableFormatting)
JSONConfiguration.Notation.NATURAL
notation only.
The default value is false.humanReadableFormatting
- whether the output should be formatted to be readable by humans easily.public JSONConfiguration.NaturalBuilder usePrefixesAtNaturalAttributes()
JSONConfiguration.Notation.NATURAL
notation only.Copyright © 2016 Oracle Corporation. All Rights Reserved.