pub fn from_json_bytes<T: DeserializeOwned>(
bytes: &[u8],
) -> Result<T, CodecError>Expand description
Decode a value from DAG-JSON bytes.
ยงErrors
Returns CodecError::Decode if the bytes are malformed or do not
match the target type T.
pub fn from_json_bytes<T: DeserializeOwned>(
bytes: &[u8],
) -> Result<T, CodecError>Decode a value from DAG-JSON bytes.
Returns CodecError::Decode if the bytes are malformed or do not
match the target type T.