Use nanoserde for serialization and deserialization
masternanoserde is a lightweight serialization framework designed to avoid heavy dependencies like syn, proc_macro2, or quote in your build tree. You can use it by deriving SerJson and DeJson traits on your data structures.
To use the derive macros, you will need both nanoserde and nanoserde-derive in your dependency tree.
use nanoserde::{DeJson, SerJson};
#[derive(Clone, Debug, Default, DeJson, SerJson)]
pub struct Property {
pub name: String,
#[nserde(default)]
pub value: String,
#[nserde(rename = "type")]
pub ty: String,
}