Package org.pkl.core.util.json
Class Json.JsObject
java.lang.Object
org.pkl.core.util.json.Json.JsObject
- Enclosing class:
- Json
-
Nested Class Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()booleancontainsKey(Object key) booleancontainsValue(Object value) entrySet()<T> Tget(String key, Json.Mapper<T> mapper) booleangetBoolean(String key) int<T> TgetNullable(String key, Json.Mapper<T> mapper) getStringOrNull(String key) getURIOrNull(String key) getVersion(String key) booleanisEmpty()keySet()voidintsize()toString()values()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
JsObject
public JsObject() -
JsObject
public JsObject(int size)
-
-
Method Details
-
get
- Throws:
Json.JsonParseException
-
getNullable
@Nullable public <T> T getNullable(String key, Json.Mapper<T> mapper) throws Json.JsonParseException - Throws:
Json.JsonParseException
-
getBoolean
- Throws:
Json.JsonParseException
-
getInt
- Throws:
Json.JsonParseException
-
getString
- Throws:
Json.JsonParseException
-
getStringOrNull
- Throws:
Json.JsonParseException
-
getObject
- Throws:
Json.JsonParseException
-
getArray
- Throws:
Json.JsonParseException
-
getVersion
- Throws:
Json.JsonParseException
-
getURI
- Throws:
Json.JsonParseException
-
getURIOrNull
- Throws:
Json.JsonParseException
-
size
public int size() -
isEmpty
public boolean isEmpty() -
containsKey
- Specified by:
containsKeyin interfaceMap<String,Object>
-
containsValue
- Specified by:
containsValuein interfaceMap<String,Object>
-
get
-
put
-
remove
-
putAll
-
clear
public void clear() -
keySet
-
values
-
entrySet
-
toString
-