Modifier and Type | Method and Description |
---|---|
static JSONValue |
parse(String jsonString)
Deprecated.
|
static JSONValue |
parseLenient(String jsonString)
Evaluates a trusted JSON string and returns its JSONValue representation.
|
static JSONValue |
parseStrict(String jsonString)
Evaluates a JSON string and returns its JSONValue representation.
|
@Deprecated public static JSONValue parse(String jsonString)
eval()
function,
which can execute arbitrary script. DO NOT pass an untrusted string into
this method.
This method has been deprecated. Please call either
parseStrict(String)
(for inputs that strictly follow the JSON
specification) or parseLenient(String)
. The implementation of this
method calls parseLenient.
jsonString
- a JSON object to parseNullPointerException
- if jsonString
is
null
IllegalArgumentException
- if jsonString
is emptypublic static JSONValue parseLenient(String jsonString)
eval()
function, which
can execute arbitrary script. DO NOT pass an untrusted string into this
method.jsonString
- a JSON object to parseNullPointerException
- if jsonString
is
null
IllegalArgumentException
- if jsonString
is emptypublic static JSONValue parseStrict(String jsonString)
JSON.parse function
is used.jsonString
- a JSON object to parseNullPointerException
- if jsonString
is null
IllegalArgumentException
- if jsonString
is emptyCopyright © 2016. All rights reserved.