Convert an object T to a Map using Gson
Returns a Map representing a json like map of the objects parameters
Type of the object which is going to be converted
Gson instance used to serialize the object