Dict

JSON dictionary.

Constructors

Link copied to clipboard
constructor()
Create an empty JSON dictionary.

Types

Link copied to clipboard
JSON dictionary entry.

Functions

Link copied to clipboard
open fun changeThread()
Change thread this pointer can be accessed from to the current one.
Link copied to clipboard
open fun clear()
Remove all elements.
Link copied to clipboard
open fun clone(): Json.Dict
Deep-copy the JSON dictionary.
Link copied to clipboard
open fun close()
Close the native pointer.
abstract fun close()
Link copied to clipboard
open fun compute(key: K, remappingFunction: BiFunction<in K, in V, out V>): V
Link copied to clipboard
open fun computeIfAbsent(key: K, mappingFunction: (in K) -> out V): V
Link copied to clipboard
open fun computeIfPresent(key: K, remappingFunction: BiFunction<in K, in V, out V>): V
Link copied to clipboard
open fun containsKey(@Nullable key: Any): Boolean
Check whether the JSON dictionary contains a key.
Link copied to clipboard
open fun containsValue(@Nullable value: Any): Boolean
Check whether the JSON dictionary contains a value.
Link copied to clipboard
open fun <K, V> copyOf(map: Map<out K, out V>): Map<K, V>
Link copied to clipboard
open fun dump(@NonNull stream: OutputStream)
Dump the JSON dictionary to an output stream.
Link copied to clipboard
open fun <K, V> entry(k: K, v: V): Map.Entry<K, V>
Link copied to clipboard
Return set of all entries.
Link copied to clipboard
open fun equals(@Nullable o: Any): Boolean
Check if the JSON dictionary is equal to another object.
Link copied to clipboard
open fun forEach(action: BiConsumer<in K, in V>)
Link copied to clipboard
open fun get(@Nullable key: Any): Json
Get a value for a key.
Link copied to clipboard
Link copied to clipboard
open fun getAtPath(@NonNull path: String): Json
Get JSON object at path.
Link copied to clipboard
open fun getBool(key: String): Optional<Boolean>
Link copied to clipboard
open fun getDict(key: String): Optional<Json.Dict>
Link copied to clipboard
open fun getInt(key: String): Optional<Integer>
Link copied to clipboard
open fun getLong(key: String): Optional<Long>
Link copied to clipboard
open fun getOrDefault(key: Any, defaultValue: V): V
Link copied to clipboard
open fun getString(key: String): Optional<String>
Link copied to clipboard
open fun hashCode(): Int
Get a hash code.
Link copied to clipboard
open fun isClosed(): Boolean
Check if the native pointer is closed.
Link copied to clipboard
open fun isEmpty(): Boolean
Check if the JSON dictionary is empty.
Link copied to clipboard
open fun isMutable(): Boolean
Check if the native pointer is mutable.
Link copied to clipboard
open fun isSamePointer(@NonNull other: Pointer): Boolean
Check if the pointer is the same as in another pointer.
Link copied to clipboard
open fun keySet(): Set<String>
Get a set of all keys.
Link copied to clipboard
open fun merge(key: K, value: V, remappingFunction: BiFunction<in V, in V, out V>): V
Link copied to clipboard
open fun <K, V> of(): Map<K, V>
Link copied to clipboard
open fun <K, V> ofEntries(entries: Array<Map.Entry<out K, out V>>): Map<K, V>
Link copied to clipboard
open fun parse(@Nullable file: File): Json.Dict
Parse a file with JSON dictionary into a dictionary.
Parse a JSON dictionary string into a dictionary.
Link copied to clipboard
open fun put(@NonNull key: String, value: Boolean): Json
open fun put(@NonNull key: String, @NonNull value: Json): Json
open fun put(@NonNull key: String, @NonNull value: Json.Array): Json
open fun put(@NonNull key: String, @NonNull value: Json.Dict): Json
open fun put(@NonNull key: String, value: Double): Json
open fun put(@NonNull key: String, value: Int): Json
open fun put(@NonNull key: String, @NonNull value: String): Json
open fun put(@NonNull key: String, value: Long): Json
Put a value at a key.
Link copied to clipboard
open fun putAll(@NonNull map: Map<out String, out Json>)
Put all values from a map.
Link copied to clipboard
open fun putIfAbsent(key: K, value: V): V
Link copied to clipboard
open fun remove(@NonNull key: Any): Json
Remove a key from the JSON dictionary.
open fun remove(key: Any, value: Any): Boolean
Link copied to clipboard
open fun replace(key: K, value: V): V
open fun replace(key: K, oldValue: V, newValue: V): Boolean
Link copied to clipboard
open fun replaceAll(function: BiFunction<in K, in V, out V>)
Link copied to clipboard
open fun size(): Int
Get size of the JSON dictionary.
Link copied to clipboard
open fun toString(): String
open fun toString(pretty: Boolean): String
Return the JSON dictionary as a JSON string.
Link copied to clipboard
Get all values.