Package org.json
Class JSONMLParserConfiguration
- java.lang.Object
-
- org.json.ParserConfiguration
-
- org.json.JSONMLParserConfiguration
-
@Deprecated public class JSONMLParserConfiguration extends ParserConfiguration
Deprecated.Configuration object for the XML to JSONML parser. The configuration is immutable.
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_MAXIMUM_NESTING_DEPTHDeprecated.We can override the default maximum nesting depth if needed.static JSONMLParserConfigurationKEEP_STRINGSDeprecated.Original configuration of the XML to JSONML Parser except that values are kept as strings.static JSONMLParserConfigurationORIGINALDeprecated.Original Configuration of the XML to JSONML Parser.-
Fields inherited from class org.json.ParserConfiguration
UNDEFINED_MAXIMUM_NESTING_DEPTH
-
-
Constructor Summary
Constructors Constructor Description JSONMLParserConfiguration()Deprecated.Default parser configuration.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description JSONMLParserConfigurationwithKeepStrings(boolean newVal)Deprecated.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)JSONMLParserConfigurationwithMaxNestingDepth(int maxNestingDepth)Deprecated.Defines the maximum nesting depth that the parser will descend before throwing an exception when parsing the XML into JSONML.-
Methods inherited from class org.json.ParserConfiguration
getMaxNestingDepth, isKeepStrings
-
-
-
-
Field Detail
-
DEFAULT_MAXIMUM_NESTING_DEPTH
public static final int DEFAULT_MAXIMUM_NESTING_DEPTH
Deprecated.We can override the default maximum nesting depth if needed.- See Also:
- Constant Field Values
-
ORIGINAL
public static final JSONMLParserConfiguration ORIGINAL
Deprecated.Original Configuration of the XML to JSONML Parser.
-
KEEP_STRINGS
public static final JSONMLParserConfiguration KEEP_STRINGS
Deprecated.Original configuration of the XML to JSONML Parser except that values are kept as strings.
-
-
Method Detail
-
withKeepStrings
public JSONMLParserConfiguration withKeepStrings(boolean newVal)
Deprecated.Description copied from class:ParserConfigurationWhen 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)- Overrides:
withKeepStringsin classParserConfiguration- Parameters:
newVal- new value to use for thekeepStringsconfiguration option.- Returns:
- The existing configuration will not be modified. A new configuration is returned.
-
withMaxNestingDepth
public JSONMLParserConfiguration withMaxNestingDepth(int maxNestingDepth)
Deprecated.Description copied from class:ParserConfigurationDefines the maximum nesting depth that the parser will descend before throwing an exception when parsing the XML into JSONML. The default max nesting depth is 512, which means the parser will throw a JsonException if the maximum depth is reached. Using any negative value as a parameter is equivalent to setting no limit to the nesting depth, which means the parses will go as deep as the maximum call stack size allows.- Overrides:
withMaxNestingDepthin classParserConfiguration- Parameters:
maxNestingDepth- the maximum nesting depth allowed to the XML parser- Returns:
- The existing configuration will not be modified. A new configuration is returned.
-
-