fromJSON

inline fun <T : Codable, Any> fromJSON(json: String): T?

Helper method to create an object from JSON

Return

An instance of the object if JSON is a valid representation

Parameters

T

The type of object to create

json

The JSON that represents the object