Interface JSONSerializer<T>

    • Method Detail

      • deserialize

        T deserialize​(Type type,
                      JsonValue jsonValue,
                      ApplicationConnection connection)
        Creates and deserializes an object received from the server. Must be compatible with serialize(Object, ApplicationConnection) and also with the server side JsonCodec.encode method.
        Parameters:
        type - the type to deserialize
        jsonValue - JSON map from property name to property value
        connection - the application connection providing the context
        Returns:
        A deserialized object
      • serialize

        JsonValue serialize​(T value,
                            ApplicationConnection connection)
        Serialize the given object into JSON. Must be compatible with deserialize(Type, JsonValue, ApplicationConnection) and also with the server side JsonCodec.decodeCustomType method.
        Parameters:
        value - The object to serialize
        connection - the application connection providing the context
        Returns:
        A JSON serialized version of the object