Skip to main content

Module json

Module json 

Source
Expand description

This module implements the json encodings of the legacy ssb data format, both signing and json transport.

Serialization methods take a boolean to switch between compact json and the signing encoding.

Structs§

DecodeJsonError
Error code and byte offset describing a deserialization failure
JsonDeserializer
A structure that deserializes json encoded legacy message values.
JsonSerializer
A structure for serializing data into the legacy json encoding.

Enums§

EncodeJsonError
Everything that can go wrong during json serialization.
ErrorCode
Everything that can go wrong during deserialization.

Functions§

from_slice
Try to parse data from the input. Validates that there are no trailing non-whitespace bytes.
from_slice_partial
Try to parse data from the input, returning the remaining input when done.
to_string
Serialize the given data structure as JSON into a String.
to_vec
Serialize the given data structure as JSON into a JSON byte vector.
to_writer
Serialize the given data structure as JSON into the IO stream.
to_writer_indent
Serialize the given data structure as JSON into the IO stream.