abstract_testing::prelude

Function from_json

Source
pub fn from_json<T>(value: impl AsRef<[u8]>) -> Result<T, StdError>
Expand description

Deserializes the given JSON bytes to a data structure.

Errors if the input is not valid JSON or cannot be deserialized to the given type.