Interface JSONStructure

All Known Implementing Classes:
JSONArray, JSONObject

public interface JSONStructure
According to JSON Grammar, there are two structural elements in JSON - objects and arrays. This interface represents both of them.
  • Method Summary

    Modifier and Type
    Method
    Description
    Serialize given JSON structure to string.
    void
    Serialize this JSON structure to a Writer.
  • Method Details

    • toJSONString

      String toJSONString()
      Serialize given JSON structure to string. Can be used for debugging or small JSON data, but streaming the JSON into Writer is preferred.
      Returns:
    • writeJSONString

      void writeJSONString(Writer writer) throws IOException
      Serialize this JSON structure to a Writer.
      Parameters:
      writer -
      Throws:
      IOException