Class MapSerializer
- java.lang.Object
-
- com.vaadin.flow.component.map.serialization.MapSerializer
-
- All Implemented Interfaces:
Serializable
public class MapSerializer extends Object implements Serializable
Custom JSON serializer for the map component using a JacksonObjectMapper
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MapSerializer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description elemental.json.JsonValue
toJson(Object value)
Serializes a map configuration object to JSON using a JacksonObjectMapper
, and returns the value as aJsonValue
to provide it in a type that is compatible with Flow.
-
-
-
Method Detail
-
toJson
public elemental.json.JsonValue toJson(Object value)
Serializes a map configuration object to JSON using a JacksonObjectMapper
, and returns the value as aJsonValue
to provide it in a type that is compatible with Flow.Throws a runtime exception if the object can not be serialized to JSON.
- Parameters:
value
- the map configuration object to be serialized into JSON- Returns:
- a
JsonValue
representing the configuration object as JSON
-
-