deserialize

abstract fun deserialize(model: Any?, key: String?, json: Any?): T

Deserializes a JSON object into a model instance.

Return

The deserialized model. Implementations may return null only when T is nullable.

Parameters

model

The host model being populated, or null when a class-level deserializer is creating the model.

key

The JSON field key being deserialized, or null when no field key is available.

json

The JSON value to deserialize. It may be null when the source value is absent or when a caller delegates an optional value.

Throws

JSONException

If exception occurs during deserialization.