Class JsonConverter<T>

    • Constructor Detail

      • JsonConverter

        public JsonConverter()
    • Method Detail

      • toJson

        public com.github.openjson.JSONObject toJson​(T object)
        Description copied from interface: IJsonConverter
        Converts a T object to a JSONObject
        Specified by:
        toJson in interface IJsonConverter<T>
        Parameters:
        object - the T object
        Returns:
        the JSONObject
      • toObject

        public T toObject​(com.github.openjson.JSONObject object)
        Description copied from interface: IJsonConverter
        Converts a JSONObject to a {code T} object
        Specified by:
        toObject in interface IJsonConverter<T>
        Parameters:
        object - the JSONObject
        Returns:
        the {code T} object