interface JsonManager
Json manager
Converting objects to JSON strings and back.
fromJson |
Converts value JSON string to instance of type abstract fun <T> fromJson(type: Class<T>, value: String): T? |
toJson |
Converts value to JSON string abstract fun <T> toJson(type: Class<T>, value: T): String |
INSTANCE |
lateinit var INSTANCE: JsonManager |
fromJson |
This extension method of JsonManager which reduces boilerplate with converting JSON string to the instance of T. fun <T> JsonManager.fromJson(value: String): T? |
toJson |
This extension method of JsonManager which reduces boilerplate with converting value to the JSON string. fun <T> JsonManager.toJson(value: T): String |
MoshiJsonManager |
Moshi JSON manager class MoshiJsonManager : JsonManager |