public final class JSON
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static org.json.simple.JSONStreamAware |
emptyJSON |
Modifier and Type | Method and Description |
---|---|
static void |
encodeObject(java.util.Map<?,?> map,
java.lang.StringBuilder sb)
Create a formatted string from a map
|
static void |
encodeValue(java.lang.Object value,
java.lang.StringBuilder sb)
Encode a JSON value
|
static org.json.simple.JSONStreamAware |
prepare(org.json.simple.JSONObject json) |
static org.json.simple.JSONStreamAware |
prepareRequest(org.json.simple.JSONObject json) |
static java.lang.String |
toJSONString(org.json.simple.JSONAware json)
Create a formatted JSON string
|
static java.lang.String |
toString(org.json.simple.JSONStreamAware jsonStreamAware) |
static void |
writeJSONString(org.json.simple.JSONStreamAware json,
java.io.Writer writer)
Write a formatted JSON string
|
public static org.json.simple.JSONStreamAware prepare(org.json.simple.JSONObject json)
public static org.json.simple.JSONStreamAware prepareRequest(org.json.simple.JSONObject json)
public static java.lang.String toString(org.json.simple.JSONStreamAware jsonStreamAware)
public static java.lang.String toJSONString(org.json.simple.JSONAware json)
json
- JSON list or mappublic static void writeJSONString(org.json.simple.JSONStreamAware json, java.io.Writer writer) throws java.io.IOException
json
- JSON list or mapwriter
- Writerjava.io.IOException
- I/O error occurredpublic static void encodeObject(java.util.Map<?,?> map, java.lang.StringBuilder sb)
map
- Mapsb
- String builderpublic static void encodeValue(java.lang.Object value, java.lang.StringBuilder sb)
value
- JSON valuesb
- String builder