Package dev.tachyonmcp.api.json
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 TypeMethodDescriptiondefault <T> Tdeserialize(String json, Class<T> targetClass) Deserializes a JSON string to the given target class.<T> Tdeserialize(String json, Type targetType) Deserializes a JSON string to the given target type.
-
Method Details
-
deserialize
Deserializes a JSON string to the given target type. -
deserialize
Deserializes a JSON string to the given target class.
-