nanoserde
nanoserde copied to clipboard
Serialisation library with zero dependencies
As seen here: https://serde.rs/enum-representations.html
Latest published version is v0.2.0-beta.0 which unfortunately requires nightly.
This change adds support for nanoserde's analogs for serde's [`serialize_with`](https://serde.rs/field-attrs.html#serialize_with) and [`deserialize_with`](https://serde.rs/field-attrs.html#skip_deserializing) field attributes. nanoserde is designed to translate directly between the serialized format the in-memory representation. This requires splitting...
Implement serialization and deserialization for Bin, Json, and Ron, for Range.
Copied from https://github.com/not-fl3/nanoserde/issues/140#issuecomment-3593715580. I tried using `ts-rs` in combination with `nanoserde` but ran into some differences in format. Given a snippet of the code where I'm trying to generate and...
This library doesn't seem to support parsing literal strings (`'`). https://toml.io/en/v1.0.0#string With `nanoserde = "0.2.1"`, see ```rust fn main() { let toml = r"winpath = 'C:\Users\nodejs\templates'"; nanoserde::TomlParser::parse(toml).unwrap(); } ```
```sh export RUSTFLAGS="-Zsanitizer=thread" cargo build ``` ``` error[E0463]: can't find crate for `nanoserde_derive` --> /home/radiant/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/nanoserde-0.2.1/src/lib.rs:23:9 | 23 | pub use nanoserde_derive::*; | ^^^^^^^^^^^^^^^^ can't find crate For more information about...
I was integrating `nanoserde` in a project of mine but ran into difficulty when trying to serialize a `HashMap
https://xkcd.com/1172/ in https://github.com/not-fl3/nanoserde/commit/5819270977f93c3c00e3da6d156e25401b8ff2d5, all whitespace was removed from RON serialization We're using RON to have a human-readable format for our levels in our game engine at our company. We use...
The following code cannot derive `DeRon` ```rust #[test] fn struct_skip_all_fields() { #[derive(SerRon, DeRon)] struct Test { #[nserde(skip)] pub field_a: usize, #[nserde(skip)] pub field_b: u64, } } ``` using `cargo expand`,...