Package nonapi.io.github.classgraph.json
Class JSONObject
java.lang.Object
nonapi.io.github.classgraph.json.JSONObject
An intermediate object in the (de)serialization process, representing a JSON Object.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionJSONObject
(int sizeHint) Constructor.JSONObject
(List<Map.Entry<String, Object>> items) Constructor. -
Method Summary
Modifier and TypeMethodDescription(package private) void
toJSONString
(Map<ReferenceEqualityKey<JSONReference>, CharSequence> jsonReferenceToId, boolean includeNullValuedFields, int depth, int indentWidth, StringBuilder buf) Serialize this JSONObject to a string.
-
Field Details
-
items
Key/value mappings, in display order. -
objectId
CharSequence objectIdObject id for cross-references, if known.
-
-
Constructor Details
-
JSONObject
public JSONObject(int sizeHint) Constructor.- Parameters:
sizeHint
- the size hint
-
JSONObject
Constructor.- Parameters:
items
- the items
-
-
Method Details
-
toJSONString
void toJSONString(Map<ReferenceEqualityKey<JSONReference>, CharSequence> jsonReferenceToId, boolean includeNullValuedFields, int depth, int indentWidth, StringBuilder buf) Serialize this JSONObject to a string.- Parameters:
jsonReferenceToId
- a map from json reference to idincludeNullValuedFields
- if true, include null valued fieldsdepth
- the nesting depthindentWidth
- the indent widthbuf
- the buf
-