Skip to main content

write_json

Function write_json 

Source
pub fn write_json<T: Serialize>(value: &T) -> NeoByteString
Expand description

Writes a value as JSON to a NeoByteString.

§Type Parameters

  • T - The type to serialize

§Arguments

  • value - The value to serialize

§Returns

A NeoByteString containing the JSON representation, or an empty byte string on error.