Package dev.tachyonmcp.api.json
Interface PayloadSerializer
- All Known Subinterfaces:
PayloadSerde
- All Known Implementing Classes:
JacksonPayloadSerde
public interface PayloadSerializer
Pluggable payload serialization 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.
Values reaching serialize(Object) must be types the implementation understands.
JsonDocument values bypass the serde.
All parameters are non-null. Passing null to
serialize(Object) is undefined and may throw.
- Author:
- Konstantin Pavlov
-
Method Summary
-
Method Details
-
serialize
Serializes a value to its JSON string representation.
-