Skip to content

edn format output, parsing and serde integration

Notifications You must be signed in to change notification settings

alexmaco/serde_edn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Work in progress

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

Working assumptions

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

Unresolved questions

  • 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 ?)

Working items list

  • Serialization to string
  • Serialization to Value
  • Deserialization from str (partial support)
  • Deserialization from Value (partial support)
  • edn! macro
  • utility functions for Value

Limitations

  • the edn! macro has some inherent limitations, due to the different treatment of whitespace and tokens between rust and edn syntax.

Future goals

  • fix or replace edn.rs to conform to spec
  • bignum support

About

edn format output, parsing and serde integration

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages