|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opengts.util.JSON
public class JSON
Nested Class Summary | |
---|---|
static class |
JSON._Array
JSON Array |
static class |
JSON._KeyValue
JSON Key/Value pair |
static class |
JSON._Object
JSON Object class |
static class |
JSON._Value
JSON Value |
static class |
JSON.JSONParsingContext
JSON Parsing Context |
static class |
JSON.JSONParsingException
JSON Parse Exception |
Constructor Summary | |
---|---|
JSON()
Constructor |
|
JSON(java.io.InputStream input)
Constructor |
|
JSON(JSON._Object obj)
Constructor |
|
JSON(java.lang.String json)
Constructor |
Method Summary | |
---|---|
void |
debugDisplayObject()
Print object contents (debug purposes only) |
static java.lang.String |
escapeJSON(java.lang.String s)
Converts the specified String to a JSON escaped value String. |
JSON._Object |
getObject()
Gets the main JSON._Object |
boolean |
hasObject()
Returns true if an object is defined |
static void |
main(java.lang.String[] argv)
Main test entry point |
static JSON._Array |
parse_Array(java.lang.String v)
Parse a JSON Array from the specified String |
static JSON._Array |
parse_Array(java.lang.String v,
JSON.JSONParsingContext context)
Parse JSON Array from the specified String |
static java.lang.String |
parse_Comment(java.lang.String v,
JSON.JSONParsingContext context)
Parse a JSON Comment from the specified String, starting at the specified location |
static JSON._KeyValue |
parse_KeyValue(java.lang.String v,
JSON.JSONParsingContext context)
Parse a Key/Value pair from the specified String at the specified location |
static java.lang.Number |
parse_Number(java.lang.String v,
JSON.JSONParsingContext context)
Parse a JSON Number |
static JSON._Object |
parse_Object(java.lang.String v)
Parse a JSON Object from the specified String. |
static JSON._Object |
parse_Object(java.lang.String v,
JSON.JSONParsingContext context)
Parse a JSON Object from the specified String, starting at the specified location. |
static java.lang.String |
parse_String(java.lang.String v,
JSON.JSONParsingContext context)
Parse a JSON String |
static JSON._Value |
parse_Value(java.lang.String v)
Parse a JSON Array from the specified String |
static JSON._Value |
parse_Value(java.lang.String v,
JSON.JSONParsingContext context)
Parse JSON Value |
void |
setObject(JSON._Object obj)
Sets the main JSON._Object |
java.lang.String |
toString()
Return a String representation of this instance |
java.lang.String |
toString(boolean inclPrefix)
Return a String representation of this instance |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public JSON()
public JSON(JSON._Object obj)
public JSON(java.lang.String json) throws JSON.JSONParsingException
JSON.JSONParsingException
public JSON(java.io.InputStream input) throws JSON.JSONParsingException, java.io.IOException
JSON.JSONParsingException
java.io.IOException
Method Detail |
---|
public static java.lang.String escapeJSON(java.lang.String s)
s
- The String to convert to a JSON encoded String
public static java.lang.String parse_Comment(java.lang.String v, JSON.JSONParsingContext context) throws JSON.JSONParsingException
JSON.JSONParsingException
public static JSON._Object parse_Object(java.lang.String v) throws JSON.JSONParsingException
JSON.JSONParsingException
public static JSON._Object parse_Object(java.lang.String v, JSON.JSONParsingContext context) throws JSON.JSONParsingException
JSON.JSONParsingException
public static JSON._KeyValue parse_KeyValue(java.lang.String v, JSON.JSONParsingContext context) throws JSON.JSONParsingException
JSON.JSONParsingException
public static JSON._Value parse_Value(java.lang.String v) throws JSON.JSONParsingException
JSON.JSONParsingException
public static JSON._Value parse_Value(java.lang.String v, JSON.JSONParsingContext context) throws JSON.JSONParsingException
JSON.JSONParsingException
public static JSON._Array parse_Array(java.lang.String v) throws JSON.JSONParsingException
JSON.JSONParsingException
public static JSON._Array parse_Array(java.lang.String v, JSON.JSONParsingContext context) throws JSON.JSONParsingException
JSON.JSONParsingException
public static java.lang.String parse_String(java.lang.String v, JSON.JSONParsingContext context) throws JSON.JSONParsingException
JSON.JSONParsingException
public static java.lang.Number parse_Number(java.lang.String v, JSON.JSONParsingContext context) throws JSON.JSONParsingException
JSON.JSONParsingException
public boolean hasObject()
public JSON._Object getObject()
public void setObject(JSON._Object obj)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(boolean inclPrefix)
public void debugDisplayObject()
public static void main(java.lang.String[] argv)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |