java.lang.Object
net.odoframework.container.GsonJson
@Singleton public class GsonJson extends Object implements Json, Runnable
Gson service proder for Json-
Constructor Details
-
GsonJson
public GsonJson() -
GsonJson
public GsonJson(boolean prettyPrint)
-
-
Method Details
-
marshal
Description copied from interface:JsonMarshals an instance of an object to aString- Specified by:
marshalin interfaceJson- Parameters:
instance- to marshal to string, will throwNullPointerExceptionif the parameter is null- Returns:
- and instance of the instance parameter in a JSON string
-
unmarshal
Description copied from interface:JsonConverts a json string into an instance of the given target type -
run
public void run()
-