-
- All Implemented Interfaces:
-
io.kjson.JSONStructure,io.kjson.JSONValue,kotlin.collections.Map
public final class JSONObject implements JSONStructure<String>, Map<String, JSONValue>
A JSON object.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classJSONObject.Companionpublic final classJSONObject.Builder
-
Field Summary
Fields Modifier and Type Field Description private final Set<Entry.Map<String, JSONValue>>entriesprivate final Set<String>keysprivate final Collection<JSONValue>valuesprivate final JSONObjectasObjectprivate final JSONObjectasObjectOrNullprivate final Integersize
-
Method Summary
Modifier and Type Method Description Set<Entry.Map<String, JSONValue>>getEntries()Set<String>getKeys()Collection<JSONValue>getValues()final JSONObjectgetAsObject()final JSONObjectgetAsObjectOrNull()IntegergetSize()UnitappendTo(Appendable a)StringtoJSON()Unitoutput(IntConsumer out)UnitcoOutput(SuspendFunction1<Character, Unit> out)BooleanisEmpty()BooleancontainsKey(String key)BooleancontainsValue(JSONValue value)JSONValueget(String key)final UnitforEachEntry(Function2<String, JSONValue, Unit> func)final UnitforEachKey(Function1<String, Unit> func)final UnitforEachValue(Function1<JSONValue, Unit> func)Booleanequals(Object other)IntegerhashCode()StringtoString()-
Methods inherited from class io.kjson.JSONStructure
getArray, getBoolean, getByte, getDecimal, getInt, getLong, getObject, getShort, getString, getUByte, getUInt, getULong, getUShort, isNotEmpty -
Methods inherited from class kotlin.collections.Map
forEach, getOrDefault -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getEntries
Set<Entry.Map<String, JSONValue>> getEntries()
-
getValues
Collection<JSONValue> getValues()
-
getAsObject
final JSONObject getAsObject()
-
getAsObjectOrNull
final JSONObject getAsObjectOrNull()
-
appendTo
Unit appendTo(Appendable a)
-
output
Unit output(IntConsumer out)
-
coOutput
Unit coOutput(SuspendFunction1<Character, Unit> out)
-
containsKey
Boolean containsKey(String key)
-
containsValue
Boolean containsValue(JSONValue value)
-
forEachEntry
final Unit forEachEntry(Function2<String, JSONValue, Unit> func)
-
forEachKey
final Unit forEachKey(Function1<String, Unit> func)
-
forEachValue
final Unit forEachValue(Function1<JSONValue, Unit> func)
-
-
-
-