Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preparing for v0.6.0 release #91

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

## [v0.6.0] - 2024-08-07

### Breaking
- MSRV is now `1.65.0`.

Expand All @@ -16,7 +18,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
error types when using tools like `probe-rs` for logging over debuggers.
- Implement `Serializer::collect_str`
- Derive `Serialize` for `de::Error` and `ser::Error`
- Support for deserializing escaped strings.
- Support for deserializing escaped strings using `from_str_escaped` and `from_slice_escaped`.

### Changed

Expand Down Expand Up @@ -91,7 +93,8 @@ error types when using tools like `probe-rs` for logging over debuggers.

Initial release

[Unreleased]: https://github.com/rust-embedded-community/serde-json-core/compare/v0.5.1...HEAD
[Unreleased]: https://github.com/rust-embedded-community/serde-json-core/compare/v0.6.0...HEAD
[v0.6.0]: https://github.com/rust-embedded-community/serde-json-core/compare/v0.5.1...v0.6.0
[v0.5.1]: https://github.com/rust-embedded-community/serde-json-core/compare/v0.5.0...v0.5.1
[v0.5.0]: https://github.com/rust-embedded-community/serde-json-core/compare/v0.4.0...v0.5.0
[v0.4.0]: https://github.com/rust-embedded-community/serde-json-core/compare/v0.3.0...v0.4.0
Expand Down
8 changes: 6 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
[package]
authors = ["Jorge Aparicio <[email protected]>"]
authors = ["Jorge Aparicio <[email protected]>",
"Ryan Summers <[email protected]>",
"Robert Jördens <[email protected]>",
"Mathias Koch <[email protected]>"
]
categories = ["no-std"]
description = "serde-json for no_std programs"
documentation = "https://docs.rs/serde-json-core"
Expand All @@ -10,7 +14,7 @@ license = "MIT OR Apache-2.0"
name = "serde-json-core"
readme = "README.md"
repository = "https://github.com/rust-embedded-community/serde-json-core"
version = "0.5.1"
version = "0.6.0"

[dependencies]
ryu = "1.0.5"
Expand Down
26 changes: 22 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,27 @@
//! This version of [`serde-json`] is aimed at applications that run on resource constrained
//! devices.
//!
//! ## Example
//! ```
//! # use serde::{Serialize, Deserialize};
//! #[derive(Serialize, Deserialize)]
//! struct Data<'a> {
//! value: u32,
//! message: &'a str,
//! }
//!
//! // Serialized JSON data can be easily deserialized into Rust types.
//! let message = b"{\"value\":10,\"message\":\"Hello, World!\"}";
//! let (data, _remainder) = serde_json_core::from_slice::<Data<'_>>(message).unwrap();
//! assert_eq!(data.value, 10);
//! assert_eq!(data.message, "Hello, World!");
//!
//! // Structures can also be serialized into slices or strings.
//! let mut deserialized = [0u8; 256];
//! let len = serde_json_core::to_slice(&data, &mut deserialized[..]).unwrap();
//! assert_eq!(&deserialized[..len], message);
//! ```
//!
//! # Current features
//!
//! - The error type is a simple C like enum (less overhead, smaller memory footprint)
Expand All @@ -16,7 +37,7 @@
//! - `bool`
//! - Integers
//! - Floats
//! - `str` (This is a zero copy operation.) (\*)
//! - `str` (This is a zero copy operation when deserializing without de-escaping strings.)
//! - `Option`
//! - Arrays
//! - Tuples
Expand All @@ -33,9 +54,6 @@
//! - Structs
//! - C like enums
//!
//! (\*) Deserialization of strings ignores escaped sequences. Escaped sequences might be supported
//! in the future using a different Serializer as this operation is not zero copy.
//!
//! (\*\*) Serialization of strings doesn't escape stuff. This simply has not been implemented yet.
//!
//! # Planned features
Expand Down