graphix-package-json 0.7.0

A dataflow language for UIs and network programming, json package
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use sys::io;

/// Parse JSON from a string, byte array, or I/O stream.
val read: fn([string, bytes, Stream<'a>]) -> Result<'b, [`JsonErr(string), `IOErr(string), `InvalidCast(string)]>;

/// Serialize a value to a JSON string.
val write_str: fn(?#pretty: bool, Any) -> Result<string, `JsonErr(string)>;

/// Serialize a value to JSON bytes.
val write_bytes: fn(?#pretty: bool, Any) -> Result<bytes, `JsonErr(string)>;

/// Serialize a value and write JSON to a stream.
val write_stream: fn(?#pretty: bool, Stream<'a>, Any) -> Result<null, [`JsonErr(string), `IOErr(string)]>;