Package ratpack.gson
Interface GsonRender
-
public interface GsonRender
Arenderable object wrapper
for rendering as JSON.- Since:
- 1.6
- See Also:
Gson.json(java.lang.Object)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description com.google.gson.Gson
getGson()
TheGson
instance to use when serializing the object to JSON.Object
getObject()
The underlying object to be rendered.
-
-
-
Method Detail
-
getObject
Object getObject()
The underlying object to be rendered.- Returns:
- The underlying object to be rendered.
-
getGson
@Nullable com.google.gson.Gson getGson()
TheGson
instance to use when serializing the object to JSON. Ifnull
then an instance will be obtained from the registry or a default instance will be created.- Returns:
- the Gson instance used in serialization.
-
-