pub fn to_json_bytes<T: Serialize>(value: &T) -> Result<Bytes, CodecError>Expand description
Encode a value as DAG-JSON for debug / inspection.
ยงErrors
Returns CodecError::Encode if the value cannot be serialized.
pub fn to_json_bytes<T: Serialize>(value: &T) -> Result<Bytes, CodecError>Encode a value as DAG-JSON for debug / inspection.
Returns CodecError::Encode if the value cannot be serialized.