Skip to content

Serialisation library with zero dependencies

Notifications You must be signed in to change notification settings

Yamakaky/nanoserde

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nanoserde

Github Actions Crates.io version Documentation Discord chat

Fork of https://crates.io/crates/makepad-tinyserde with all the dependencies removed. No more syn, proc_macro2 or quote in the build tree!

> cargo tree
nanoserde v0.1.0 (/../nanoserde)
└── nanoserde-derive v0.1.0 (/../nanoserde/derive)

Example:

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,
}

For more examples take a look on tests

Features support matrix:

Feature json bin ron toml
serialization yes yes no no
deserialization yes yes yes no
container: Struct yes yes yes no
container: Tuple Struct no yes no no
container: Enum yes yes no no
field: std::collections::HashMap yes yes yes no
field: std::vec::Vec yes yes yes no
field: Option yes yes yes no
field: i*/f*/String/T: De*/Ser* yes yes yes no
field attribute: #[nserde(default)] yes no yes no
field attribute: #[nserde(rename = "")] yes yes yes no
field attribute: #[nserde(proxy = "")] no yes no no
container attribute: #[nserde(default)] yes no yes no
container attribute: #[nserde(rename = "")] yes yes yes no
container attribute: #[nserde(proxy = "")] yes yes no no

About

Serialisation library with zero dependencies

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%