Skip to main content

Module cross_format

Module cross_format 

Source
Expand description

Dependency-free streaming interoperability between structured formats.

The EventSink contract is deliberately smaller than a type-driven serialization framework. It represents the complete JSON data model and allows formats to relay values without constructing an intermediate tree.

Structs§

CborSink
Streaming RFC 8949 CBOR destination for JSON-compatible events.
JsonSink
JSON destination for EventSink streams.

Traits§

EventSink
Receives a validated stream of JSON-compatible structural events.

Functions§

cbor_into
Relay one complete CBOR value into an event sink.
cbor_into_with_max_depth
Relay one complete CBOR value with an explicit maximum nesting depth.
cbor_to_json
Stream one complete CBOR value into compact JSON bytes without an intermediate value tree.
cbor_to_json_pretty
Stream one complete CBOR value into pretty-printed JSON bytes.
cbor_to_json_with_config
Stream one complete CBOR value into JSON bytes with an explicit encoding configuration.
cbor_to_json_writer
Stream one complete CBOR value into a JSON writer.
json_into
Relay one complete JSON value into an event sink.
json_into_with_config
Relay one complete JSON value using an explicit nesting configuration.
json_to_cbor
Stream one complete JSON value into CBOR bytes without an intermediate value tree.
json_to_cbor_writer
Stream one complete JSON value into a CBOR writer.