[Experimental] Crate to parse and emit EDN
Cargo.toml
toml
[dependencies]
edn-rs = "0.2.1"
Parse an EDN into a EdnNode
:
```rust
extern crate edn_rs;
use ednrs::parseedn;
fn main() { ... let edn = String::from("[1 2 [:3 \"4\"]]"); let value = parse_edn(edn); ... } ```
Emits EDN format from a Json file ```rust use ednrs::emitedn;
fn main() { let json = String::from("{\"hello\": \"world\"}"); let edn = String::from("{:hello \"world\"}");
assert_eq!(edn, emit_edn(json));
} ```
struct
to map EDN info EdnNode
EdnType
""
"\"string\""
"324352"
, "3442.234"
, "3/4"
"[1 :2 \"d\"]"
"(1 :2 \"d\")"
"#{1 2 3}"
"{:a 1 :b 2 }"
EdnType::Err
, "{:a 1 :b}"
"[1 2 [:3 \"4\"]]"
"[1 2 #{:3 \"4\"}]"
dedup
due to the fact that they need to be compliant with EDN spec)