public class ParserConfiguration extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_MAXIMUM_NESTING_DEPTH
The default maximum nesting depth when parsing a document.
|
protected boolean |
keepStrings
Specifies if values should be kept as strings (
true), or if
they should try to be guessed into JSON values (numeric, boolean, string) |
protected int |
maxNestingDepth
The maximum nesting depth when parsing a document.
|
static int |
UNDEFINED_MAXIMUM_NESTING_DEPTH
Used to indicate there's no defined limit to the maximum nesting depth when parsing a document.
|
| Modifier | Constructor and Description |
|---|---|
|
ParserConfiguration() |
protected |
ParserConfiguration(boolean keepStrings,
int maxNestingDepth) |
| Modifier and Type | Method and Description |
|---|---|
protected ParserConfiguration |
clone()
Provides a new instance of the same configuration.
|
int |
getMaxNestingDepth()
The maximum nesting depth that the parser will descend before throwing an exception
when parsing the XML into JSONML.
|
boolean |
isKeepStrings()
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) |
<T extends ParserConfiguration> |
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) |
<T extends ParserConfiguration> |
withMaxNestingDepth(int maxNestingDepth)
Defines the maximum nesting depth that the parser will descend before throwing an exception
when parsing the XML into JSONML.
|
public static final int UNDEFINED_MAXIMUM_NESTING_DEPTH
public static final int DEFAULT_MAXIMUM_NESTING_DEPTH
protected boolean keepStrings
true), or if
they should try to be guessed into JSON values (numeric, boolean, string)protected int maxNestingDepth
public ParserConfiguration()
protected ParserConfiguration(boolean keepStrings,
int maxNestingDepth)
protected ParserConfiguration clone()
public boolean isKeepStrings()
true), or if
they should try to be guessed into JSON values (numeric, boolean, string)keepStrings configuration value.public <T extends ParserConfiguration> T withKeepStrings(boolean newVal)
true), or if
they should try to be guessed into JSON values (numeric, boolean, string)newVal - new value to use for the keepStrings configuration option.public int getMaxNestingDepth()
public <T extends ParserConfiguration> T withMaxNestingDepth(int maxNestingDepth)
maxNestingDepth - the maximum nesting depth allowed to the XML parser