Skip to main content

bytes_to_json

Function bytes_to_json 

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

Deserializes a NeoByteString as JSON.

§Type Parameters

  • T - The target type for deserialization

§Returns

  • Some(T) if deserialization succeeds
  • None if the bytes are not valid JSON for the target type