JsonML crate

JsonML deserialization and serialization

Deserialization example:

```rust

use std::collections::HashMap;

use jsonml::{Element, AttributeValue};

let element: Element = serdejson::fromstr(r#"[ "li", { "style": "color:red" }, "First Item" ]"#) .expect("deserialize element tag"); asserteq!( element, Element::Tag { name: "li".tostring(), attributes: HashMap::from([( "style".tostring(), AttributeValue::String("color:red".tostring()) )]), elementlist: vec![Element::String("First Item".tostring())] } ); ```

Serialization example:

```rust

use std::collections::HashMap;

use jsonml::{Element, AttributeValue};

let element = Element::Tag { name: "li".tostring(), attributes: HashMap::from([( "style".tostring(), AttributeValue::String("color:red".tostring()))] ), elementlist: vec![Element::String("First Item".tostring())] }; asserteq!( serdejson::tostring(&element).expect("serialize element tag"), r#"["li",{"style":"color:red"},"First Item"]"# ); ```

Features

When the feature any-attribute-value-type is turned on, serde_json::value::Value is used for AttributeValue. This is useful for deserializing JsonML documents where the attribute value types do not strictly follow JsonML syntax.

License

Licensed under either of the following at your option: