Interface PayloadDeserializer

All Known Subinterfaces:
PayloadSerde
All Known Implementing Classes:
JacksonPayloadSerde

public interface PayloadDeserializer
Pluggable payload deserialization for structured values and arguments.

The primary contract is String-based because structuredContent is always parsed into the protocol model by the Jackson parser before encoding — raw bytes never reach the wire — and non-Jackson serdes (kotlinx.serialization, gson) emit Strings natively. byte[] round-trips added conversions without saving any.

All parameters are non-null. Passing null to deserialize(String, Type) is undefined and may throw.

Author:
Konstantin Pavlov
  • Method Summary

    Modifier and Type
    Method
    Description
    default <T> T
    deserialize(String json, Class<T> targetClass)
    Deserializes a JSON string to the given target class.
    <T> T
    deserialize(String json, Type targetType)
    Deserializes a JSON string to the given target type.
  • Method Details

    • deserialize

      <T> T deserialize(String json, Type targetType)
      Deserializes a JSON string to the given target type.
    • deserialize

      default <T> T deserialize(String json, Class<T> targetClass)
      Deserializes a JSON string to the given target class.