Package net.minidev.json.parser
Class JSONParser
java.lang.Object
net.minidev.json.parser.JSONParser
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Throws exception on excessive 0 leading in digitsstatic final int
Parse NaN as Float.NaNstatic final int
allow non quoted teststatic final int
allow simple quote as String quoting charstatic final int
If enabled json-smart will throws exception if datas are present after the end of the Json data.static final int
smart mode, fastest parsing mode.static final int
Throws exception on useless comma in object and arraystatic final int
Use double if possible for big digits, if no precision lost is observedstatic int
Default json-smart processing modestatic final int
Ignore control char in input text.static final int
If limit the max depth of json sizestatic final int
Parse Object like json-simple Best for an iso-bug json-simple API port.static final int
smart mode, fastest parsing mode.static final int
strict RFC4627 mode.static final int
Strictest parsing modestatic final int
smart mode, fastest parsing mode.static final int
Allow Json-smart to use Double or BigDecimal to store floating point value You may need to disable HI_PRECISION_FLOAT feature on 32bit to improve parsing performances.static final int
Use int datatype to store number when it's possible. -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.prefer usage of new JSONParser(JSONParser.MODE_*)JSONParser
(int permissifMode) -
Method Summary
Modifier and TypeMethodDescriptionparse
(byte[] in) use to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactory<T> T
use to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactory<T> T
parse
(byte[] in, JsonReaderI<T> mapper) use to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactoryparse
(InputStream in) use to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactory<T> T
parse
(InputStream in, Class<T> mapTo) use to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactory<T> T
parse
(InputStream in, JsonReaderI<T> mapper) use to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactoryuse to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactory<T> T
use to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactory<T> T
parse
(Reader in, JsonReaderI<T> mapper) use to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactoryuse to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactory<T> T
use to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactory<T> T
parse
(String in, JsonReaderI<T> mapper) use to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactory
-
Field Details
-
ACCEPT_SIMPLE_QUOTE
public static final int ACCEPT_SIMPLE_QUOTEallow simple quote as String quoting char- See Also:
-
ACCEPT_NON_QUOTE
public static final int ACCEPT_NON_QUOTEallow non quoted test- See Also:
-
ACCEPT_NAN
public static final int ACCEPT_NANParse NaN as Float.NaN- See Also:
-
IGNORE_CONTROL_CHAR
public static final int IGNORE_CONTROL_CHARIgnore control char in input text.- See Also:
-
USE_INTEGER_STORAGE
public static final int USE_INTEGER_STORAGEUse int datatype to store number when it's possible.- Since:
- 1.0.7
- See Also:
-
ACCEPT_LEADING_ZERO
public static final int ACCEPT_LEADING_ZEROThrows exception on excessive 0 leading in digits- Since:
- 1.0.7
- See Also:
-
ACCEPT_USELESS_COMMA
public static final int ACCEPT_USELESS_COMMAThrows exception on useless comma in object and array- Since:
- 1.0.8
- See Also:
-
USE_HI_PRECISION_FLOAT
public static final int USE_HI_PRECISION_FLOATAllow Json-smart to use Double or BigDecimal to store floating point value You may need to disable HI_PRECISION_FLOAT feature on 32bit to improve parsing performances.- Since:
- 1.0.9
- See Also:
-
ACCEPT_TAILLING_DATA
public static final int ACCEPT_TAILLING_DATAIf enabled json-smart will throws exception if datas are present after the end of the Json data.- Since:
- 1.0.9-2
- See Also:
-
ACCEPT_TAILLING_SPACE
public static final int ACCEPT_TAILLING_SPACEsmart mode, fastest parsing mode. accept lots of non standard json syntax- Since:
- 2.0.1
- See Also:
-
REJECT_127_CHAR
public static final int REJECT_127_CHARsmart mode, fastest parsing mode. accept lots of non standard json syntax- Since:
- 2.2.2
- See Also:
-
BIG_DIGIT_UNRESTRICTED
public static final int BIG_DIGIT_UNRESTRICTEDUse double if possible for big digits, if no precision lost is observed- Since:
- 2.4
- See Also:
-
LIMIT_JSON_DEPTH
public static final int LIMIT_JSON_DEPTHIf limit the max depth of json size- Since:
- 2.5
- See Also:
-
MODE_PERMISSIVE
public static final int MODE_PERMISSIVEsmart mode, fastest parsing mode. accept lots of non standard json syntax- Since:
- 1.0.6
- See Also:
-
MODE_RFC4627
public static final int MODE_RFC4627strict RFC4627 mode. slower than PERMISSIVE MODE.- Since:
- 1.0.6
- See Also:
-
MODE_JSON_SIMPLE
public static final int MODE_JSON_SIMPLEParse Object like json-simple Best for an iso-bug json-simple API port.- Since:
- 1.0.7
- See Also:
-
MODE_STRICTEST
public static final int MODE_STRICTESTStrictest parsing mode- Since:
- 2.0.1
- See Also:
-
DEFAULT_PERMISSIVE_MODE
public static int DEFAULT_PERMISSIVE_MODEDefault json-smart processing mode
-
-
Constructor Details
-
JSONParser
public JSONParser()Deprecated.prefer usage of new JSONParser(JSONParser.MODE_*) -
JSONParser
public JSONParser(int permissifMode)
-
-
Method Details
-
parse
use to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactory- Throws:
ParseException
-
parse
use to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactory- Throws:
ParseException
-
parse
use to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactory- Throws:
ParseException
-
parse
use to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactory -
parse
public <T> T parse(InputStream in, JsonReaderI<T> mapper) throws ParseException, UnsupportedEncodingException use to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactory -
parse
public <T> T parse(InputStream in, Class<T> mapTo) throws ParseException, UnsupportedEncodingException use to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactory -
parse
use to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactory- Throws:
ParseException
-
parse
use to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactory- Throws:
ParseException
-
parse
use to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactory- Throws:
ParseException
-
parse
use to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactory- Throws:
ParseException
-
parse
use to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactory- Throws:
ParseException
-
parse
use to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactory- Throws:
ParseException
-