The serialization of the mdast fails to deserialize because of a duplicate field type
#[test]
fn test_serde() {
let markdown = "This is a **test**";
let tree =
markdown::to_mdast(&markdown, &markdown::ParseOptions::default()).unwrap();
let json = serde_json::to_string(&tree).unwrap();
let tree2: Node = serde_json::from_str(&json).unwrap();
assert!(tree == tree2);
}
I get the following error from serde
Error("duplicate field `type`", line: 1, column: 21)
This is the generated json. It has duplicate type fields everywhere.
The serialization of the mdast fails to deserialize because of a duplicate field type
I get the following error from serde
This is the generated json. It has duplicate type fields everywhere.
Looking at the AST
enum
and relatedstruct
s they all haveserde(tag, rename)
macro configs, which seem to be conflicting.