net.minidev.json.parser
Class JSONParser

java.lang.Object
  extended by net.minidev.json.parser.JSONParser

public class JSONParser
extends Object


Field Summary
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_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. accept lots of non standard json syntax
static int MODE_RFC4627
          strict RFC4627 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 Summary
JSONParser()
          Deprecated. prefer usage of new JSONParser(JSONParser.MODE_*)
JSONParser(int permissifMode)
           
 
Method Summary
 Object parse(Reader in)
          use to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactory
 Object parse(Reader in, ContainerFactory containerFactory)
          use to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactory
 Object parse(Reader in, ContainerFactory containerFactory, ContentHandler handler)
          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
 Object parse(String in, ContainerFactory containerFactory)
          use to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactory
 Object parse(String in, ContainerFactory containerFactory, ContentHandler handler)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACCEPT_SIMPLE_QUOTE

public static final int ACCEPT_SIMPLE_QUOTE
allow simple quote as String quoting char

See Also:
Constant Field Values

ACCEPT_NON_QUOTE

public static final int ACCEPT_NON_QUOTE
allow non quoted test

See Also:
Constant Field Values

ACCEPT_NAN

public static final int ACCEPT_NAN
Parse NaN as Float.NaN

See Also:
Constant Field Values

IGNORE_CONTROL_CHAR

public static final int IGNORE_CONTROL_CHAR
Ignore control char in input text.

See Also:
Constant Field Values

USE_INTEGER_STORAGE

public static final int USE_INTEGER_STORAGE
Use int datatype to store number when it's possible.

Since:
1.0.7
See Also:
Constant Field Values

ACCEPT_LEADING_ZERO

public static final int ACCEPT_LEADING_ZERO
Throws exception on excessive 0 leading in digits

Since:
1.0.7
See Also:
Constant Field Values

ACCEPT_USELESS_COMMA

public static final int ACCEPT_USELESS_COMMA
Throws exception on useless comma in object and array

Since:
1.0.8
See Also:
Constant Field Values

USE_HI_PRECISION_FLOAT

public static final 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.

Since:
1.0.9
See Also:
Constant Field Values

MODE_PERMISSIVE

public static final int MODE_PERMISSIVE
smart mode, fastest parsing mode. accept lots of non standard json syntax

Since:
1.0.6
See Also:
Constant Field Values

MODE_RFC4627

public static final int MODE_RFC4627
strict RFC4627 mode. slower than PERMISIF MODE.

Since:
1.0.6
See Also:
Constant Field Values

MODE_JSON_SIMPLE

public static final int MODE_JSON_SIMPLE
Parse Object like json-simple Best for an iso-bug json-simple API port.

Since:
1.0.7
See Also:
Constant Field Values

DEFAULT_PERMISSIVE_MODE

public static int DEFAULT_PERMISSIVE_MODE
Default json-smart processing mode

Constructor Detail

JSONParser

public JSONParser()
Deprecated. prefer usage of new JSONParser(JSONParser.MODE_*)


JSONParser

public JSONParser(int permissifMode)
Method Detail

parse

public Object parse(String in)
             throws ParseException
use to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactory

Throws:
ParseException

parse

public Object parse(String in,
                    ContainerFactory containerFactory)
             throws ParseException
use to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactory

Throws:
ParseException

parse

public Object parse(String in,
                    ContainerFactory containerFactory,
                    ContentHandler handler)
             throws ParseException
Throws:
ParseException

parse

public Object parse(Reader in)
             throws ParseException
use to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactory

Throws:
ParseException

parse

public Object parse(Reader in,
                    ContainerFactory containerFactory)
             throws ParseException
use to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactory

Throws:
ParseException

parse

public Object parse(Reader in,
                    ContainerFactory containerFactory,
                    ContentHandler handler)
             throws ParseException
use to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactory

Throws:
ParseException


Copyright © 2011 Chemouni Uriel. All Rights Reserved.