Package ratpack.gson
Interface GsonRender
-
public interface GsonRenderArenderable object wrapperfor 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.GsongetGson()TheGsoninstance to use when serializing the object to JSON.ObjectgetObject()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()
TheGsoninstance to use when serializing the object to JSON. Ifnullthen an instance will be obtained from the registry or a default instance will be created.- Returns:
- the Gson instance used in serialization.
-
-