java.lang.Object
java.util.AbstractMap<K,V>
 
java.util.HashMap
org.jooq.tools.json.JSONObject
- All Implemented Interfaces:
- Serializable,- Cloneable,- Map
A JSON object. Key value pairs are unordered. JSONObject supports
 java.util.Map interface.
- Author:
- FangYidong<fangyidong@yahoo.com.cn>
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from class java.util.AbstractMapAbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> 
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic StringEscape quotes, \, /, \r, \n, \b, \f, \t and other control characters (U+0000 through U+001F).static StringtoJSONString(Map<?, ?> map) Convert a map to JSON text.toString()static Stringstatic voidwriteJSONString(Map<?, ?> map, Writer out) Encode a map into JSON text and write it to out.Methods inherited from class java.util.HashMapclear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, newHashMap, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesMethods inherited from class java.util.AbstractMapequals, hashCode
- 
Constructor Details- 
JSONObjectpublic JSONObject()
- 
JSONObject
 
- 
- 
Method Details- 
writeJSONStringEncode a map into JSON text and write it to out.- Throws:
- IOException
- See Also:
 
- 
toJSONStringConvert a map to JSON text. The result is a JSON object.- Returns:
- JSON text, or "null" if map is null.
- See Also:
 
- 
toString
- 
toString- Overrides:
- toStringin class- AbstractMap
 
- 
escapeEscape quotes, \, /, \r, \n, \b, \f, \t and other control characters (U+0000 through U+001F). It's the same as JSONValue.escape() only for compatibility here.- See Also:
 
 
-