fson 1.0.0

Flexible Serialized Object Notation
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use fson::{object, parser::parse, Value};

#[test]
fn basic() {
    assert_eq!(
        parse(String::from(
            "{
      x: { y: { z: 'hello' } },
      string: `${#/x/y/z} world`
    }"
        ))
        .unwrap(),
        Value::Object(object!(
          String::from("x") => Value::Object(object!(String::from("y") => Value::Object(object!(String::from("z") => Value::String(String::from("hello")))))),
          String::from("string") => Value::String(String::from("hello world"))
        ))
    );
}