public class JSONParser extends Object
Modifier and Type | Field and Description |
---|---|
static int |
ACCEPT_LEADING_ZERO
Throws exception on excessive 0 leading in digits
|
static int |
ACCEPT_NAN
Parse NaN as Float.NaN
|
static int |
ACCEPT_NON_QUOTE
allow non quoted test
|
static int |
ACCEPT_SIMPLE_QUOTE
allow simple quote as String quoting char
|
static int |
ACCEPT_TAILLING_DATA
If enabled json-smart will throws exception if datas are present after
the end of the Json data.
|
static int |
ACCEPT_TAILLING_SPACE
smart mode, fastest parsing mode.
|
static int |
ACCEPT_USELESS_COMMA
Throws exception on useless comma in object and array
|
static int |
DEFAULT_PERMISSIVE_MODE
Default json-smart processing mode
|
static int |
IGNORE_CONTROL_CHAR
Ignore control char in input text.
|
static int |
MODE_JSON_SIMPLE
Parse Object like json-simple
Best for an iso-bug json-simple API port.
|
static int |
MODE_PERMISSIVE
smart mode, fastest parsing mode.
|
static int |
MODE_RFC4627
strict RFC4627 mode.
|
static int |
MODE_STRICTEST
Strictest parsing mode
|
static int |
REJECT_127_CHAR
smart mode, fastest parsing mode.
|
static int |
USE_HI_PRECISION_FLOAT
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 int |
USE_INTEGER_STORAGE
Use int datatype to store number when it's possible.
|
Constructor and Description |
---|
JSONParser()
Deprecated.
prefer usage of new JSONParser(JSONParser.MODE_*)
|
JSONParser(int permissifMode) |
Modifier and Type | Method and Description |
---|---|
Object |
parse(byte[] in)
use to return Primitive Type, or String, Or JsonObject or JsonArray
generated by a ContainerFactory
|
<T> T |
parse(byte[] in,
Class<T> mapTo)
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 ContainerFactory
|
Object |
parse(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 ContainerFactory
|
Object |
parse(Reader in)
use to return Primitive Type, or String, Or JsonObject or JsonArray
generated by a ContainerFactory
|
<T> T |
parse(Reader in,
Class<T> mapTo)
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 ContainerFactory
|
Object |
parse(String in)
use to return Primitive Type, or String, Or JsonObject or JsonArray
generated by a ContainerFactory
|
<T> T |
parse(String in,
Class<T> mapTo)
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
|
public static final int ACCEPT_SIMPLE_QUOTE
public static final int ACCEPT_NON_QUOTE
public static final int ACCEPT_NAN
public static final int IGNORE_CONTROL_CHAR
public static final int USE_INTEGER_STORAGE
public static final int ACCEPT_LEADING_ZERO
public static final int ACCEPT_USELESS_COMMA
public static final int USE_HI_PRECISION_FLOAT
public static final int ACCEPT_TAILLING_DATA
public static final int ACCEPT_TAILLING_SPACE
public static final int REJECT_127_CHAR
public static final int MODE_PERMISSIVE
public static final int MODE_RFC4627
public static final int MODE_JSON_SIMPLE
public static final int MODE_STRICTEST
public static int DEFAULT_PERMISSIVE_MODE
public JSONParser()
public JSONParser(int permissifMode)
public Object parse(byte[] in) throws ParseException
ParseException
public <T> T parse(byte[] in, JsonReaderI<T> mapper) throws ParseException
ParseException
public <T> T parse(byte[] in, Class<T> mapTo) throws ParseException
ParseException
public Object parse(InputStream in) throws ParseException, UnsupportedEncodingException
public <T> T parse(InputStream in, JsonReaderI<T> mapper) throws ParseException, UnsupportedEncodingException
public <T> T parse(InputStream in, Class<T> mapTo) throws ParseException, UnsupportedEncodingException
public Object parse(Reader in) throws ParseException
ParseException
public <T> T parse(Reader in, JsonReaderI<T> mapper) throws ParseException
ParseException
public <T> T parse(Reader in, Class<T> mapTo) throws ParseException
ParseException
public Object parse(String in) throws ParseException
ParseException
public <T> T parse(String in, JsonReaderI<T> mapper) throws ParseException
ParseException
public <T> T parse(String in, Class<T> mapTo) throws ParseException
ParseException
Copyright © 2017 Chemouni Uriel. All rights reserved.