Crates.io | sval |
lib.rs | sval |
version | 2.13.0 |
source | src |
created_at | 2018-12-03 01:08:10.89418 |
updated_at | 2024-03-28 13:06:59.108724 |
description | Streaming, structured value serialization |
homepage | |
repository | https://github.com/sval-rs/sval |
max_upload_size | |
id | 99762 |
size | 152,347 |
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.