Skip to main content

read_json

Function read_json 

Source
pub fn read_json<T: for<'de> Deserialize<'de>>(
    bytes: &NeoByteString,
) -> Option<T>
Expand description

Reads a JSON-serialized value from a NeoByteString.

§Type Parameters

  • T - The type to deserialize

§Arguments

  • bytes - The bytes containing JSON data

§Returns

  • Some(T) if deserialization succeeds
  • None if deserialization fails