public class JSONParser
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
S_END |
static int |
S_IN_ARRAY |
static int |
S_IN_ERROR |
static int |
S_IN_FINISHED_VALUE |
static int |
S_IN_OBJECT |
static int |
S_IN_PAIR_VALUE |
static int |
S_INIT |
static int |
S_PASSED_PAIR_KEY |
Constructor and Description |
---|
JSONParser() |
Modifier and Type | Method and Description |
---|---|
int |
getPosition() |
java.lang.Object |
parse(java.io.Reader in) |
java.lang.Object |
parse(java.io.Reader in,
ContainerFactory containerFactory)
Parse JSON text into java object from the input source.
|
java.lang.Object |
parse(java.lang.String s) |
java.lang.Object |
parse(java.lang.String s,
ContainerFactory containerFactory) |
void |
reset()
Reset the parser to the initial state without resetting the underlying reader.
|
void |
reset(java.io.Reader in)
Reset the parser to the initial state with a new character reader.
|
public static final int S_INIT
public static final int S_IN_FINISHED_VALUE
public static final int S_IN_OBJECT
public static final int S_IN_ARRAY
public static final int S_PASSED_PAIR_KEY
public static final int S_IN_PAIR_VALUE
public static final int S_END
public static final int S_IN_ERROR
public void reset()
public void reset(java.io.Reader in)
in
- - The new character reader.java.io.IOException
ParseException
public int getPosition()
public java.lang.Object parse(java.lang.String s) throws ParseException
ParseException
public java.lang.Object parse(java.lang.String s, ContainerFactory containerFactory) throws ParseException
ParseException
public java.lang.Object parse(java.io.Reader in) throws java.io.IOException, ParseException
java.io.IOException
ParseException
public java.lang.Object parse(java.io.Reader in, ContainerFactory containerFactory) throws java.io.IOException, ParseException
in
- containerFactory
- - Use this factory to create your own JSON object and JSON array containers.java.io.IOException
ParseException
Copyright © 2005-2011 Potix Corporation. All Rights Reserved.