ACP.RPC.JsonRpcMessage (agent_client_protocol v0.1.0)

Copy Markdown View Source

Wraps a JSON-RPC message with the required jsonrpc: "2.0" field.

Summary

Functions

Decode from a JSON string. Returns the inner message (request, response, or notification).

Encode to JSON string (line-delimited).

Types

t()

@type t() :: %ACP.RPC.JsonRpcMessage{message: map()}

Functions

decode(json_string)

Decode from a JSON string. Returns the inner message (request, response, or notification).

encode!(msg)

Encode to JSON string (line-delimited).

to_json(json_rpc_message)

wrap(message)