Skip to main content

Crate sark_json

Crate sark_json 

Source

Re-exports§

pub use bytes::Bytes;
pub use bytes::proofs::Plain;
pub use bytes::proofs::PlainError;
pub use bytes::proofs::Raw;
pub use bytes::proofs::Text;
pub use bytes::proofs::TextValue;

Modules§

input
parsing
JSON decoding contracts.
segment
Cooperative JSON decoding over independently retained transport segments.
writing
JSON sizing and encoding machinery.

Structs§

Bytes
JSON bytes that borrow the request when possible and own only decoded escapes.
Plain
Valid UTF-8 containing no JSON string escape characters.
Raw
One complete validated JSON value, including its UTF-8 proof.
Text
An immutable owner whose complete bytes are valid UTF-8.
Token

Enums§

Error
PlainError
Storage

Traits§

TextValue
String inputs whose UTF-8 proof survives until the complete write.

Attribute Macros§

json
Derives decoding/encoding on nongeneric structs; encode/try_encode also accept generics. seq, nested accepts &Owner: IntoIterator of owned/borrowed encoders; decoding requires Vec<T>. Exact writes are checked independently of sizing, even if the owner changes between traversals. Derives JSON decoding and encoding for structs declared at module scope. Decoding requires nongeneric structs; encode and try_encode also support generics. Type and const arguments cannot contain macros, local bindings, or item declarations.