Package dev.latvian.apps.json
Class JSONObject
- All Implemented Interfaces:
JSONSerializable,StructuredJSON,Serializable,Cloneable,Map<String,,Object> SequencedMap<String,Object>
public class JSONObject
extends LinkedHashMap<String,Object>
implements JSONSerializable, StructuredJSON
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> -
Method Summary
Modifier and TypeMethodDescriptionasArray()booleanbooleandoubledoubleintintlonglongasObject()getOrDefault(Object key, Object defaultValue) static JSONObjectof()static JSONObjectof(int initialCapacity) static JSONObjectstatic JSONObjectstatic JSONObjectstatic JSONObjectstatic JSONObjectofSize(int size) booleanremoveDeep(DeepRemovePredicate predicate, boolean removeEmpty) final ObjecttoJSON()toString()Methods inherited from class java.util.LinkedHashMap
clear, containsValue, entrySet, forEach, keySet, newLinkedHashMap, putFirst, putLast, removeEldestEntry, replaceAll, reversed, sequencedEntrySet, sequencedKeySet, sequencedValues, valuesMethods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, newHashMap, put, putAll, putIfAbsent, remove, remove, replace, replace, sizeMethods inherited from class java.util.AbstractMap
equals, hashCodeMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, sizeMethods inherited from interface java.util.SequencedMap
firstEntry, lastEntry, pollFirstEntry, pollLastEntry
-
Method Details
-
of
-
ofSize
-
of
-
of
-
of
-
of
-
of
-
toJSON
- Specified by:
toJSONin interfaceJSONSerializable
-
asObject
- Specified by:
asObjectin interfaceStructuredJSON
-
asArray
- Specified by:
asArrayin interfaceStructuredJSON
-
get
-
getOrDefault
- Specified by:
getOrDefaultin interfaceMap<String,Object> - Overrides:
getOrDefaultin classLinkedHashMap<String,Object>
-
append
-
asObject
-
addObject
-
asArray
-
addArray
-
asString
-
asString
-
asNumber
-
asNumber
-
asInt
-
asInt
-
asLong
-
asLong
-
asDouble
-
asDouble
-
asBoolean
-
asBoolean
-
toString
- Overrides:
toStringin classAbstractMap<String,Object>
-
toPrettyString
-
removeDeep
-