Interface JSONAble<T>


public interface JSONAble<T>
A class which represents an object that can be parsed to or from JSON.
Since:
0.1.2.0
Author:
creatorfromhell
  • Method Summary

    Modifier and Type
    Method
    Description
    fromJSON(String serialized)
    Used to generate information for this object from
    org.json.simple.JSONObject
    toJSON(T object)
    Used to serialize this object to a JSON-valid string.
  • Method Details

    • toJSON

      org.json.simple.JSONObject toJSON(T object)
      Used to serialize this object to a JSON-valid string.
      Parameters:
      object - The object to serialize.
      Returns:
      The JSONObject associated with the JSON-valid String.
    • fromJSON

      T fromJSON(String serialized)
      Used to generate information for this object from
      Parameters:
      serialized - The JSON-valid String that we are going to deserialize.
      Returns:
      The object that was deserialized from the JSON string.