|
EZ JSON by Nathanaël Cottin |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ezjson.JSONDecoder
public final class JSONDecoder
Default JSON objects serialized form parser
Constructor Summary | |
---|---|
JSONDecoder()
|
Method Summary | |
---|---|
static JSONObject |
decode(java.io.BufferedReader in)
Generates a JSON object from a source stream |
static JSONBoolean |
getAsBoolean(JSONValue value)
Attempts to get a JSON boolean from any JSON value (usually a JSON string) when the actual type of this JSON value is unknown. |
static JSONInteger |
getAsInteger(JSONValue value)
Attempts to get a JSON integer from any JSON value (usually a JSON string) when the actual type of this JSON value is unknown. |
static JSONNumber |
getAsNumber(JSONValue value)
Attempts to get a JSON number from any JSON value (usually a JSON string) when the actual type of this JSON value is unknown. |
static JSONReal |
getAsReal(JSONValue value)
Attempts to get a JSON real from any JSON value (usually a JSON string or a JSON integer) when the actual type of this JSON value is unknown. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JSONDecoder()
Method Detail |
---|
public static JSONObject decode(java.io.BufferedReader in) throws java.io.IOException, JSONDecodingException
in
- The non-nul source reader which contains a JSON
encoded object
java.io.IOException
- The decoder could not access the reader content
JSONDecodingException
- The source content does not conform to
a valid JSON encodingpublic static JSONBoolean getAsBoolean(JSONValue value) throws JSONDecodingException
value
- A possibly null value (mostly obtained from a
decoded JSON object)
JSONDecodingException
- The non-null provided value does
not represent a boolean valuepublic static JSONNumber getAsNumber(JSONValue value) throws JSONDecodingException
value
- A possibly null value (mostly obtained from a
decoded JSON object)
JSONNumber.isInteger()
JSONDecodingException
- The non-null provided value does
not represent a number valuepublic static JSONInteger getAsInteger(JSONValue value) throws JSONDecodingException
value
- A possibly null value (mostly obtained from a
decoded JSON object)
JSONDecodingException
- The non-null provided value does
not represent an integer valuepublic static JSONReal getAsReal(JSONValue value) throws JSONDecodingException
value
- A possibly null value (mostly obtained from a
decoded JSON object)
JSONDecodingException
- The non-null provided value does
not represent a real value
|
EZ JSON by Nathanaël Cottin |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |