| Constructor and Description |
|---|
JsonObject() |
| Modifier and Type | Method and Description |
|---|---|
String |
serialize()
Returns a JSON-format string representation of this object.
|
JsonObject |
setProperty(String key,
@Nullable Boolean value)
Sets the given boolean property.
|
JsonObject |
setProperty(String key,
@Nullable Date date) |
JsonObject |
setProperty(String key,
Json json) |
JsonObject |
setProperty(String key,
@Nullable Number number) |
JsonObject |
setProperty(String key,
@Nullable String value) |
public String serialize()
JsonThe string must evaluate in a Javascript engine; i.e. it must be a valid RHS for the Javascript expression: { data : RHS }
Thus, nulls, booleans, numbers, strings, arrays and objects should be supported by implementing classes.
Closures must not be returned with this method.
serialize in interface Jsonpublic JsonObject setProperty(String key, Json json)
public JsonObject setProperty(String key, @Nullable String value)
public JsonObject setProperty(String key, @Nullable Boolean value)
key - the property namevalue - the property valuepublic JsonObject setProperty(String key, @Nullable Number number)
public JsonObject setProperty(String key, @Nullable Date date)
Copyright © 2003–2022 Atlassian. All rights reserved.