org.zkoss.json.parser
Class JSONParser
java.lang.Object
org.zkoss.json.parser.JSONParser
public class JSONParser
- extends Object
Parser for JSON text. Please note that JSONParser is NOT thread-safe.
- Author:
- FangYidong
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
S_INIT
public static final int S_INIT
- See Also:
- Constant Field Values
S_IN_FINISHED_VALUE
public static final int S_IN_FINISHED_VALUE
- See Also:
- Constant Field Values
S_IN_OBJECT
public static final int S_IN_OBJECT
- See Also:
- Constant Field Values
S_IN_ARRAY
public static final int S_IN_ARRAY
- See Also:
- Constant Field Values
S_PASSED_PAIR_KEY
public static final int S_PASSED_PAIR_KEY
- See Also:
- Constant Field Values
S_IN_PAIR_VALUE
public static final int S_IN_PAIR_VALUE
- See Also:
- Constant Field Values
S_END
public static final int S_END
- See Also:
- Constant Field Values
S_IN_ERROR
public static final int S_IN_ERROR
- See Also:
- Constant Field Values
JSONParser
public JSONParser()
reset
public void reset()
- Reset the parser to the initial state without resetting the underlying reader.
reset
public void reset(Reader in)
- Reset the parser to the initial state with a new character reader.
- Parameters:
in - - The new character reader.
- Throws:
IOException
ParseException
getPosition
public int getPosition()
- Returns:
- The position of the beginning of the current token.
parse
public Object parse(String s)
throws ParseException
- Throws:
ParseException
parse
public Object parse(String s,
ContainerFactory containerFactory)
throws ParseException
- Throws:
ParseException
parse
public Object parse(Reader in)
throws IOException,
ParseException
- Throws:
IOException
ParseException
parse
public Object parse(Reader in,
ContainerFactory containerFactory)
throws IOException,
ParseException
- Parse JSON text into java object from the input source.
- Parameters:
in - containerFactory - - Use this factory to createyour own JSON object and JSON array containers.
- Returns:
- Instance of the following:
org.zkoss.json.JSONObject,
org.zkoss.json.JSONArray,
java.lang.String,
java.lang.Number,
java.lang.Boolean,
null
- Throws:
IOException
ParseException
Copyright © 2013. All Rights Reserved.