sval
: Streaming, structured valuessval
is a lightweight serialization-only framework that treats values like a flat stream of tokens.
It's well suited to self-describing text formats like JSON.
serde
?serde
is the de-facto serialization framework for Rust and is well suited to the majority of
use cases. sval
is like a light blend of serde::ser
and serde::de
that is smaller in scope.
It makes a few key different design decisions than serde
that make it effective for working with
self-describing formats:
null
: the absence of any other meaningful value.true
and false
.u8
-u128
, i8
-i128
.f32
-f64
.sval
includes built-in tags that extend its data-model with some common datatypes:
()
.Option<T>
.Other built-in tags may be added in the future. Libraries may also define their own tags.
This project has a complete and stable API, but isn't well documented yet.