serializeToMap

fun <T> T.serializeToMap(gson: Gson): Map<String, Any>

Convert an object T to a Map using Gson

Return

Returns a Map representing a json like map of the objects parameters

Parameters

T

Type of the object which is going to be converted

gson

Gson instance used to serialize the object