Constructor and Description |
---|
JSONUtil() |
Modifier and Type | Method and Description |
---|---|
protected static Object |
convertStringValueToObject(String inStringValue) |
static String |
escapeString(String inValue)
Escapes JSON string values according to RFC 4627.
|
static CharSequence |
stripLineComments(CharSequence inJSON)
This function strips any line comments from the JSON since they are not valid JSON syntax.
|
static JsCollection |
toJsonObj(CharSequence inJSON)
Converts a JSON string back into objects.
|
static JsCollection |
toJsonObj(File inJsonFile)
Converts a JSON file back into objects.
|
static JsCollection |
toJsonObj(InputStream inJson)
Converts a JSON stream back into objects.
|
static JsCollection |
toJsonObj(Reader inJson)
Converts a JSON Reader into objects.
|
static String |
unescapeString(String inValue)
Un-escapes JSON string values according to RFC 4627.
|
public JSONUtil()
public static JsCollection toJsonObj(File inJsonFile) throws IOException
IOException
public static JsCollection toJsonObj(Reader inJson) throws IOException
IOException
public static JsCollection toJsonObj(InputStream inJson) throws IOException
IOException
public static JsCollection toJsonObj(CharSequence inJSON)
public static String escapeString(String inValue)
inValue
- the String to be escapedpublic static String unescapeString(String inValue)
inValue
- the String to be unescapedpublic static CharSequence stripLineComments(CharSequence inJSON)
inJSON
- the JSON string to be cleansed of line commentsprotected static Object convertStringValueToObject(String inStringValue)