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()
Json
The 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 Json
public 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–2021 Atlassian. All rights reserved.