Class MapSerialization
java.lang.Object
com.vaadin.componentfactory.maps.util.MapSerialization
- All Implemented Interfaces:
Serializable
Util class that handles the configuration needed for the model classes to be
serialized to JSON.
- Version:
- $Id: $Id
- Author:
- Vaadin
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic tools.jackson.databind.ObjectMapperCreate the defaultObjectMapperused for serialization.static tools.jackson.databind.ObjectMappercreateObjectMapper(tools.jackson.databind.ser.ValueSerializerModifier modifier) createObjectMapper.static voidsetObjectWriter(tools.jackson.databind.ObjectWriter newObjectWriter) This method can be used to configure theObjectMapperobject used to serialize configuration objects to client side.static StringtoJSON(AbstractConfigurationObject object) toJSON.
-
Constructor Details
-
MapSerialization
public MapSerialization()
-
-
Method Details
-
createObjectMapper
public static tools.jackson.databind.ObjectMapper createObjectMapper()Create the defaultObjectMapperused for serialization.- Returns:
- a
ObjectMapperobject.
-
createObjectMapper
public static tools.jackson.databind.ObjectMapper createObjectMapper(tools.jackson.databind.ser.ValueSerializerModifier modifier) createObjectMapper.
- Parameters:
modifier- aValueSerializerModifierobject.- Returns:
- a
ObjectMapperobject.
-
setObjectWriter
public static void setObjectWriter(tools.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- aObjectWriterobject.- See Also:
-
toJSON
toJSON.
- Parameters:
object- aAbstractConfigurationObjectobject.- Returns:
- a
Stringobject.
-