Backplane. AiProtocol. Serialization
(backplane_ai_protocol v0.7.0)
Copy Markdown
Safe JSON encoding for portable values and explicitly approved public projections.
Provider state, reasoning state, and execution context require protocol-specific encoders and are rejected here even when nested.
Summary
Functions
@spec decode_and_validate( term(), (map() -> {:ok, term()} | {:error, Backplane.AiProtocol.Error.t()}), keyword() ) :: {:ok, term()} | {:error, Backplane.AiProtocol.Error.t()}
@spec from_json( String.t(), keyword() ) :: {:ok, term()} | {:error, Backplane.AiProtocol.Error.t()}
@spec to_json(term()) :: {:ok, String.t()} | {:error, Backplane.AiProtocol.Error.t()}