Class MapSerializer

java.lang.Object
com.vaadin.flow.component.map.serialization.MapSerializer

public class MapSerializer extends Object
Custom JSON serializer for the map component using a Jackson ObjectMapper
  • Constructor Details

    • MapSerializer

      public MapSerializer(MapBase map)
  • Method Details

    • toJson

      public tools.jackson.databind.node.BaseJsonNode toJson(Object value)
      Serializes a map configuration object to JSON using a custom Jackson ObjectMapper that handles Flow StreamResource and DownloadHandler to serialize those into URLs.
      Parameters:
      value - the map configuration object to be serialized into JSON
      Returns:
      a BaseJsonNode representing the configuration object as JSON
      Throws:
      IllegalArgumentException - if the object can not be serialized to JSON