Serde support for Extensible Data Notation (edn), the S-expressions superset used as syntax for the clojure programming language.
At the moment it uses edn.rs to bootstrap development. The parser will be replaced in the future.
serde_edn
also provides its own Value
type and edn!
macro for constructing values
serde_edn
is heavily inspired by and modeled after serde_json
Serialization:
from Rust | to edn |
---|---|
tuple, tuple struct | list (or vector ?) |
struct, struct variant | map keyed with keywords |
enum | map? |
unit variant | keyword |
Vec | vector |
HashMap, BTreeMap | map |
HashSet, BTreeSet | set |
LinkedList | list |
- how to map all edn constructs to rust types
- handling of symbols and keywords
- restrict deserialization to matching types ? (i.e. do we want to allow deserializing a Vec from an edn
#{...}
set ?)
- Serialization to string
- Serialization to Value
- Deserialization from str (partial support)
- Deserialization from Value (partial support)
-
edn!
macro - utility functions for
Value
- the
edn!
macro has some inherent limitations, due to the different treatment of whitespace and tokens between rust and edn syntax.
- fix or replace edn.rs to conform to spec
- bignum support