Class ChartSerialization
java.lang.Object
com.vaadin.flow.component.charts.util.ChartSerialization
- All Implemented Interfaces:
Serializable
Util class that handles the configuration needed for the model classes to be
serialized to JSON.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic com.fasterxml.jackson.databind.ObjectMapperCreate the defaultObjectMapperused for serialization.static com.fasterxml.jackson.databind.ObjectMappercreateObjectMapper(com.fasterxml.jackson.databind.ser.BeanSerializerModifier modifier) static voidsetObjectMapperInstance(com.fasterxml.jackson.databind.ObjectWriter newObjectWriter) This method can be used to configure theObjectMapperobject used to serialize configuration objects to client side.static StringtoJSON(AbstractConfigurationObject object)
-
Method Details
-
createObjectMapper
public static com.fasterxml.jackson.databind.ObjectMapper createObjectMapper()Create the defaultObjectMapperused for serialization. -
createObjectMapper
public static com.fasterxml.jackson.databind.ObjectMapper createObjectMapper(com.fasterxml.jackson.databind.ser.BeanSerializerModifier modifier) -
setObjectMapperInstance
public static void setObjectMapperInstance(com.fasterxml.jackson.databind.ObjectWriter newObjectWriter) This method can be used to configure theObjectMapperobject used to serialize configuration objects to client side. If users have made their extensions to underlying library and wish to build a typed Java API for it, adding custom serializers might be needed.- Parameters:
newObjectWriter-- See Also:
-
toJSON
-