| 程序包 | 说明 |
|---|---|
| com.blade.kit.json |
| 限定符和类型 | 类和说明 |
|---|---|
class |
JSONArray
Represents a JSON array, an ordered collection of JSON values.
|
class |
JSONObject
Represents a JSON object, a set of name/value pairs, where the names are
strings and the values are JSON values.
|
| 限定符和类型 | 字段和说明 |
|---|---|
static JSONValue |
JSON.FALSE
Represents the JSON literal
false. |
static JSONValue |
JSON.NULL
Represents the JSON literal
null. |
static JSONValue |
JSON.TRUE
Represents the JSON literal
true. |
| 限定符和类型 | 方法和说明 |
|---|---|
static JSONValue |
JSON.array()
Creates a new empty JsonArray.
|
JSONValue |
JSONArray.get(int index)
Returns the value of the element at the specified position in this array.
|
JSONValue |
JSONObject.get(String name)
Returns the value of the member with the specified name in this object.
|
JSONValue |
JSONObject.Member.getValue()
Returns the value of this member.
|
static JSONValue |
JSON.parse(Reader reader)
Reads the entire input from the given reader and parses it as JSON.
|
static JSONValue |
JSON.parse(String string)
Parses the given input string as JSON.
|
static JSONValue |
JSONHelper.toJSONValue(Object object) |
static JSONValue |
JSON.value(Boolean value)
Returns a JsonValue instance that represents the given
boolean value. |
static JSONValue |
JSON.value(Byte value) |
static JSONValue |
JSON.value(Double value)
Returns a JsonValue instance that represents the given
double value. |
static JSONValue |
JSON.value(Float value)
Returns a JsonValue instance that represents the given
float
value. |
static JSONValue |
JSON.value(Integer value)
Returns a JsonValue instance that represents the given
int
value. |
static JSONValue |
JSON.value(Long value)
Returns a JsonValue instance that represents the given
long
value. |
static JSONValue |
JSON.value(Object value) |
static JSONValue |
JSON.value(String string)
Returns a JsonValue instance that represents the given string.
|
| 限定符和类型 | 方法和说明 |
|---|---|
Iterator<JSONValue> |
JSONArray.iterator()
Returns an iterator over the values of this array in document order.
|
List<JSONValue> |
JSONArray.values()
Returns a list of the values in this array in document order.
|
| 限定符和类型 | 方法和说明 |
|---|---|
JSONArray |
JSONArray.add(JSONValue value)
Appends the specified JSON value to the end of this array.
|
JSONObject |
JSONObject.put(String name,
JSONValue value)
Appends a new member to the end of this object, with the specified name
and the specified JSON value.
|
JSONArray |
JSONArray.set(int index,
JSONValue value)
Replaces the element at the specified position in this array with the
specified JSON value.
|
JSONObject |
JSONObject.set(String name,
JSONValue value)
Sets the value of the member with the specified name to the specified
JSON value.
|
static Object |
JSONHelper.toJSONObject(JSONValue value) |
Copyright © 2016. All rights reserved.