Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

JSON codec

The JsonCodec serializes and deserializes messages using serde_json. It is a text-based codec that is easy to inspect and useful for debugging and interoperability thanks to its human-readability.

When to use it

Use JsonCodec when readability and interoperability are more important than binary compactness.

It is a good fit for HTTP-friendly transports, browser interoperability, debugging, or when message structure must be inspected easily.