Class NoopSerDes

java.lang.Object
software.amazon.lambda.durable.serde.NoopSerDes
All Implemented Interfaces:
SerDes

public class NoopSerDes extends Object implements SerDes
a placeholder for operations that don't have data to serialize or deserialize
  • Constructor Details

    • NoopSerDes

      public NoopSerDes()
  • Method Details

    • serialize

      public String serialize(Object value)
      Description copied from interface: SerDes
      Serializes an object to a JSON string.
      Specified by:
      serialize in interface SerDes
      Parameters:
      value - the object to serialize
      Returns:
      the JSON string representation, or null if value is null
    • deserialize

      public <T> T deserialize(String data, TypeToken<T> typeToken)
      Description copied from interface: SerDes
      Deserializes a JSON string to an object of the specified generic type.

      This method supports complex generic types like List<MyObject> or Map<String, MyObject> that cannot be represented by a simple Class object.

      Usage example:

      
       List<String> items = serDes.deserialize(json, new TypeToken<List<String>>() {});
       
      Specified by:
      deserialize in interface SerDes
      Type Parameters:
      T - the target type
      Parameters:
      data - the JSON string to deserialize
      typeToken - the type token capturing the generic type information
      Returns:
      the deserialized object, or null if data is null