Properties

Link copied to clipboard

Functions

Link copied to clipboard
fun <T : ModelObject> deserializeModel(jsonObject: JSONObject, modelClass: Class<T>): T

Parse a JSONObject to a class that extends ModelObject using its ModelObject.Serializer.

Link copied to clipboard

Parse a JSONObject to a class that extends ModelObject using its ModelObject.Serializer. Result can also be null if the object is null.

Link copied to clipboard

Parse a JSONArray to a List of objects that extend ModelObject. Result can also be null if the object is null.

Link copied to clipboard
fun <T : ModelObject> serializeOpt(modelObject: T?, serializer: ModelObject.Serializer<T>): JSONObject?

Serializes a class extending ModelObject into a JSONObject.

Link copied to clipboard

Serializes a List containing objects that extend ModelObject into a JSONArray.