|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.commons.util.io.json.JsonParser
public class JsonParser
JSON parser.
This class provides some methods for generating parsing JSON text and create objects out of it. It uses a factory to deal with the actual object classes.
Constructor Summary | |
---|---|
JsonParser()
|
Method Summary | |
---|---|
static java.lang.Object |
fromJson(JsonFactory factory,
java.io.Reader reader)
Parse a JSON stream and return an object. |
static java.lang.Object |
fromJson(JsonFactory factory,
java.lang.String json)
Parse a JSON text and return an object. |
static boolean |
isJson(java.lang.String json)
Check if a string a a valid JSON text. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JsonParser()
Method Detail |
---|
public static boolean isJson(java.lang.String json)
json
- the JSON text to check
JsonException
public static java.lang.Object fromJson(JsonFactory factory, java.lang.String json) throws JsonException
factory
- the object factoryjson
- the JSON text
JsonException
public static java.lang.Object fromJson(JsonFactory factory, java.io.Reader reader) throws JsonException
factory
- the object factoryreader
- the JSON stream
JsonException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |