public interface Jsonable
JSONObject
.
To invoke default autobinding, the constructor can and should call bind(JSONObject)
.Modifier and Type | Method and Description |
---|---|
default void |
bind(JSONObject json)
Binds this Jsonable to an
JSONObject . |
default java.lang.String |
jsonName()
May be overridden to name the JSON object returned from
toJson() . |
default JSONObject |
toJson()
Builds an
org.json.JSONObject
representing this.
|
default JSONObject toJson()
default java.lang.String jsonName()
toJson()
.default void bind(JSONObject json)
JSONObject
.
Call this from the constructor to invoke autobinding.json
- the JSONObject to bind toCopyright © 2018