Crate sp_serializer

Source
Expand description

Substrate customizable serde serializer.

The idea is that we can later change the implementation to something more compact, but for now we’re using JSON.

Structs§

Error
This type represents all possible errors that can occur when serializing or deserializing JSON data.

Functions§

encode
Serialize the given data structure as a JSON byte vector.
from_reader
Deserialize an instance of type T from an I/O stream of JSON.
from_slice
Deserialize an instance of type T from bytes of JSON text.
from_str
Deserialize an instance of type T from a string of JSON text.
to_string_pretty
Serialize the given data structure as a pretty-printed String of JSON.
to_writer
Serialize the given data structure as JSON into the IO stream.

Type Aliases§

Result
Alias for a Result with the error type serde_json::Error.