Class JSONValue

java.lang.Object
ch.epfl.cs107.play.data.json.JSONValue
Direct Known Subclasses:
JSONArray, JSONBoolean, JSONNull, JSONNumber, JSONObject, JSONString

public abstract sealed class JSONValue extends Object permits JSONObject, JSONArray, JSONString, JSONNumber, JSONBoolean, JSONNull
Used to represent json values
  • Constructor Details

    • JSONValue

      public JSONValue()
  • Method Details

    • toJSONString

      protected abstract String toJSONString()
      Serializes the implementing class to a JSON-formatted string.
      Returns:
      A JSON-formatted string representation of the object.
    • toString

      public String toString()
      Overrides:
      toString in class Object