| Constructor and Description |
|---|
JsonArray(JsonFactory factory) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
asBoolean()
Convert the underlying value to boolean
|
double |
asNumber()
Convert the underlying value to a number
|
String |
asString()
Convert the underlying value to a String
|
JsonValue |
get(int index) |
JsonArray |
getArray(int index) |
boolean |
getBoolean(int index) |
double |
getNumber(int index) |
JsonObject |
getObject(int index) |
String |
getString(int index) |
JsonType |
getType()
Returns an enumeration representing the fundamental JSON type.
|
boolean |
isEmpty()
Check if the json has no value stored.
|
int |
length() |
void |
remove(int index) |
void |
set(int index,
boolean bool) |
void |
set(int index,
double number) |
void |
set(int index,
JsonValue value) |
void |
set(int index,
String string) |
String |
toJson()
Returns a serialized JSON string representing this value.
|
void |
traverse(org.dashbuilder.json.JsonVisitor visitor,
org.dashbuilder.json.JsonContext ctx)
Visitor interface
|
public JsonArray(JsonFactory factory)
public boolean isEmpty()
JsonValuepublic boolean asBoolean()
JsonValuepublic double asNumber()
JsonValuepublic String asString()
JsonValuepublic JsonValue get(int index)
public JsonArray getArray(int index)
public boolean getBoolean(int index)
public double getNumber(int index)
public JsonObject getObject(int index)
public String getString(int index)
public JsonType getType()
JsonValuepublic int length()
public void remove(int index)
public void set(int index,
JsonValue value)
public void set(int index,
String string)
public void set(int index,
double number)
public void set(int index,
boolean bool)
public String toJson()
JsonValueCopyright © 2017–2021 JBoss by Red Hat. All rights reserved.