From b697120335ff5164f18629792a7d66ede3ff3ab9 Mon Sep 17 00:00:00 2001 From: kirk Date: Sat, 14 Sep 2024 18:02:16 +0000 Subject: [PATCH] Add documentation of recent serialize_none_as_null attribute, and bump crate version --- Cargo.toml | 4 ++-- README.md | 44 +++++++++++++++++++++++--------------------- derive/Cargo.toml | 2 +- 3 files changed, 26 insertions(+), 24 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 4c3c2b4..42b7604 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nanoserde" -version = "0.2.0-beta.0" +version = "0.2.0-beta.1" authors = ["makepad ", "Fedor "] license = "MIT OR Apache-2.0" description = """ @@ -30,4 +30,4 @@ toml = [] std = [] [dependencies] -nanoserde-derive = { path = "derive", version = "=0.2.0-beta.0", optional = true } +nanoserde-derive = { path = "derive", version = "=0.2.0-beta.1", optional = true } diff --git a/README.md b/README.md index 3e2f164..9214a77 100644 --- a/README.md +++ b/README.md @@ -33,27 +33,29 @@ For more examples take a look at [tests](/tests) ## Features support matrix: -| Feature | json | bin | ron | toml | -| --------------------------------------------------- | ------ | ----- | ------ | ----- | -| serialization | yes | yes | yes | no | -| deserialization | yes | yes | yes | no | -| container: Struct | yes | yes | yes | no | -| container: Tuple Struct | no | yes | yes | no | -| container: Enum | yes | yes | yes | 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(default = "")]` | yes | no | yes | no | -| container attribute: `#[nserde(default_with = "")]` | yes | no | yes | no | -| container attribute: `#[nserde(skip)]` | yes | no | yes | no | -| container attribute: `#[nserde(rename = "")]` | yes | yes | yes | no | -| container attribute: `#[nserde(proxy = "")]` | yes | yes | no | no | -| container attribute: `#[nserde(transparent)]` | yes | no | no | no | +| Feature | json | bin | ron | toml | +| --------------------------------------------------- | ------ | ----- | ------ | ----- | +| serialization | yes | yes | yes | no | +| deserialization | yes | yes | yes | no | +| container: Struct | yes | yes | yes | no | +| container: Tuple Struct | no | yes | yes | no | +| container: Enum | yes | yes | yes | 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 | +| field attribute: `#[nserde(serialize_none_as_null)]` | yes | no | no | no | +| container attribute: `#[nserde(default)]` | yes | no | yes | no | +| container attribute: `#[nserde(default = "")]` | yes | no | yes | no | +| container attribute: `#[nserde(default_with = "")]` | yes | no | yes | no | +| container attribute: `#[nserde(skip)]` (implies `default`)| yes | no | yes | no | +| container attribute: `#[nserde(serialize_none_as_null)]` | yes | no | no | no | +| container attribute: `#[nserde(rename = "")]` | yes | yes | yes | no | +| container attribute: `#[nserde(proxy = "")]` | yes | yes | no | no | +| container attribute: `#[nserde(transparent)]` | yes | no | no | no | ## Crate features: diff --git a/derive/Cargo.toml b/derive/Cargo.toml index 095ec21..76c633e 100644 --- a/derive/Cargo.toml +++ b/derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nanoserde-derive" -version = "0.2.0-beta.0" +version = "0.2.0-beta.1" authors = ["Makepad ", "Fedor "] edition = "2018" description = "Fork of makepad-tinyserde derive without any external dependencies"