com.googlecode.wickedcharts.highcharts.jackson
Class JsonRenderer
java.lang.Object
com.googlecode.wickedcharts.highcharts.jackson.JsonRenderer
public class JsonRenderer
- extends Object
A renderer for rendering Highcharts options into JSON objects based on the
Jackson Mapping library.
- Author:
- Tom Hombergs (tom.hombergs@gmail.com)
|
Method Summary |
|
addSerializer(Class<T> clazz,
com.fasterxml.jackson.databind.JsonSerializer<T> serializer)
This method gives the opportunity to add a custom serializer to serializer
one of the highchart option classes. |
|
fromJson(String json,
Class<T> targetClazz)
|
String |
toJson(Object object)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_MAPPER
public static final com.fasterxml.jackson.databind.ObjectMapper DEFAULT_MAPPER
- The default mapper can be used to bypass the serializers registered in the
WickedChartsJacksonModule.
JsonRenderer
public JsonRenderer()
addSerializer
public <T> void addSerializer(Class<T> clazz,
com.fasterxml.jackson.databind.JsonSerializer<T> serializer)
- This method gives the opportunity to add a custom serializer to serializer
one of the highchart option classes. It may be neccessary to serialize
certain option classes differently for different web frameworks.
- Parameters:
clazz - the option classserializer - the serializer responsible for serializing objects of the option
class.
toJson
public String toJson(Object object)
fromJson
public <T> T fromJson(String json,
Class<T> targetClazz)
Copyright © 2013. All Rights Reserved.