Package io.kjson
Object JSONObject.Companion
-
- All Implemented Interfaces:
public class JSONObject.Companion
-
-
Field Summary
Fields Modifier and Type Field Description private final JSONObjectEMPTYpublic final static JSONObject.CompanionINSTANCE
-
Method Summary
Modifier and Type Method Description final JSONObjectof(Pair<String, JSONValue> items)Create a JSONObject from a vararglist of map entries.final JSONObjectfrom(Map<String, JSONValue> map)Create a JSONObject from a Map. final JSONObjectfrom(List<Pair<String, JSONValue>> list)Create a JSONObject from a List of Pairs of name and value. final JSONObjectbuild(Function1<JSONObject.Builder, Unit> block)Create a JSONObject by applying the supplied block to a Builder, and then taking the result. final JSONObjectgetEMPTY()An empty JSONObject. -
-
Method Detail
-
of
final JSONObject of(Pair<String, JSONValue> items)
Create a JSONObject from a
vararglist of map entries.
-
from
final JSONObject from(Map<String, JSONValue> map)
Create a JSONObject from a Map.
-
from
final JSONObject from(List<Pair<String, JSONValue>> list)
Create a JSONObject from a List of Pairs of name and value.
-
build
final JSONObject build(Function1<JSONObject.Builder, Unit> block)
Create a JSONObject by applying the supplied block to a Builder, and then taking the result.
-
getEMPTY
final JSONObject getEMPTY()
An empty JSONObject.
-
-
-
-