public class JSONMLParserConfiguration extends ParserConfiguration
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_MAXIMUM_NESTING_DEPTH
We can override the default maximum nesting depth if needed.
|
static JSONMLParserConfiguration |
KEEP_STRINGS
Original configuration of the XML to JSONML Parser except that values are kept as strings.
|
static JSONMLParserConfiguration |
ORIGINAL
Original Configuration of the XML to JSONML Parser.
|
keepStrings, maxNestingDepth, UNDEFINED_MAXIMUM_NESTING_DEPTH| Modifier | Constructor and Description |
|---|---|
|
JSONMLParserConfiguration()
Default parser configuration.
|
protected |
JSONMLParserConfiguration(boolean keepStrings,
int maxNestingDepth)
Configure the parser string processing and use the default CDATA Tag Name as "content".
|
| Modifier and Type | Method and Description |
|---|---|
protected JSONMLParserConfiguration |
clone()
Provides a new instance of the same configuration.
|
JSONMLParserConfiguration |
withKeepStrings(boolean newVal)
When parsing the XML into JSONML, specifies if values should be kept as strings (
true), or if
they should try to be guessed into JSON values (numeric, boolean, string) |
JSONMLParserConfiguration |
withMaxNestingDepth(int maxNestingDepth)
Defines the maximum nesting depth that the parser will descend before throwing an exception
when parsing the XML into JSONML.
|
getMaxNestingDepth, isKeepStringspublic static final int DEFAULT_MAXIMUM_NESTING_DEPTH
public static final JSONMLParserConfiguration ORIGINAL
public static final JSONMLParserConfiguration KEEP_STRINGS
public JSONMLParserConfiguration()
protected JSONMLParserConfiguration(boolean keepStrings,
int maxNestingDepth)
keepStrings - true to parse all values as string.
false to try and convert XML string values into a JSON value.maxNestingDepth - int to limit the nesting depthprotected JSONMLParserConfiguration clone()
clone in class ParserConfigurationpublic JSONMLParserConfiguration withKeepStrings(boolean newVal)
ParserConfigurationtrue), or if
they should try to be guessed into JSON values (numeric, boolean, string)withKeepStrings in class ParserConfigurationnewVal - new value to use for the keepStrings configuration option.public JSONMLParserConfiguration withMaxNestingDepth(int maxNestingDepth)
ParserConfigurationwithMaxNestingDepth in class ParserConfigurationmaxNestingDepth - the maximum nesting depth allowed to the XML parserCopyright © 2024. All rights reserved.