-
- All Implemented Interfaces:
public final class ExtensionKt
-
-
Method Summary
Modifier and Type Method Description final static <T extends JSONValue> JSONRef<T>ptr(JSONValue $self, JSONPointer pointer)Create a JSONRef from thisJSONValue and the specified JSONPointer.final static <T extends JSONValue> UnitifPresent(JSONRef<JSONObject> $self, String name, Function2<JSONRef<T>, T, Unit> block)Conditionally execute if JSONObject referenced by thisJSONRef contains a member with the specified key and the expected type.final static <T extends JSONValue> UnitforEachKey(JSONRef<JSONObject> $self, Function2<JSONRef<T>, String, Unit> block)Iterate over the members of the JSONObject referenced by thisJSONRef.final static <T extends JSONValue> UnitforEach(JSONRef<JSONArray> $self, Function2<JSONRef<T>, Integer, Unit> block)Iterate over the members of the JSONArray referenced by thisJSONRef.-
-
Method Detail
-
ptr
final static <T extends JSONValue> JSONRef<T> ptr(JSONValue $self, JSONPointer pointer)
Create a JSONRef from
thisJSONValue and the specified JSONPointer.
-
ifPresent
final static <T extends JSONValue> Unit ifPresent(JSONRef<JSONObject> $self, String name, Function2<JSONRef<T>, T, Unit> block)
Conditionally execute if JSONObject referenced by
thisJSONRef contains a member with the specified key and the expected type.
-
forEachKey
final static <T extends JSONValue> Unit forEachKey(JSONRef<JSONObject> $self, Function2<JSONRef<T>, String, Unit> block)
Iterate over the members of the JSONObject referenced by
thisJSONRef.
-
-
-
-