public class JsonObject
extends java.lang.Object
Constructor and Description |
---|
JsonObject()
Create a Json object that doesn't respect the order.
|
JsonObject(boolean respectOrder)
Create a Json object.
|
Modifier and Type | Method and Description |
---|---|
static JsonObject |
create(JsopTokenizer t)
Reads a JSON object from the given tokenizer.
|
static JsonObject |
create(JsopTokenizer t,
boolean respectOrder)
Reads a JSON object from the given tokenizer.
|
static JsonObject |
fromJson(java.lang.String json,
boolean respectOrder)
Build a Json object from a String.
|
java.util.Map<java.lang.String,JsonObject> |
getChildren()
Get the (mutable) map of children.
|
java.util.Map<java.lang.String,java.lang.String> |
getProperties()
Get the (mutable) map of properties.
|
void |
toJson(JsopBuilder buf)
Write the object to a builder.
|
java.lang.String |
toString()
Pretty-print the object.
|
public JsonObject()
public JsonObject(boolean respectOrder)
respectOrder
- whether the object should respect the orderpublic static JsonObject fromJson(java.lang.String json, boolean respectOrder)
json
- the json stringrespectOrder
- whether the object should respect the child orderpublic static JsonObject create(JsopTokenizer t, boolean respectOrder)
t
- tokenizerrespectOrder
- whether the order should be respectedpublic static JsonObject create(JsopTokenizer t)
t
- tokenizerpublic void toJson(JsopBuilder buf)
buf
- the targetpublic java.util.Map<java.lang.String,java.lang.String> getProperties()
public java.util.Map<java.lang.String,JsonObject> getChildren()
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2010 - 2020 Adobe. All Rights Reserved