Class JSONObject

java.lang.Object
nonapi.io.github.classgraph.json.JSONObject

class JSONObject extends Object
An intermediate object in the (de)serialization process, representing a JSON Object.
  • Field Details

  • Constructor Details

    • JSONObject

      public JSONObject(int sizeHint)
      Constructor.
      Parameters:
      sizeHint - the size hint
    • JSONObject

      public JSONObject(List<Map.Entry<String,Object>> items)
      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 id
      includeNullValuedFields - if true, include null valued fields
      depth - the nesting depth
      indentWidth - the indent width
      buf - the buf