Skip to main content

from_json_bytes

Function from_json_bytes 

Source
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.