Expand description
§json-steroids
A high-performance, zero-copy JSON parsing library for Rust.
§Features
- Zero-copy string parsing where possible
- Efficient SIMD-friendly parsing (when available)
- Derive macros for automatic serialization/deserialization
- Minimal allocations
§Example
ⓘ
use json_steroids::{Json, JsonSerialize, JsonDeserialize, to_string, from_str};
#[derive(Debug, Json, PartialEq)]
struct Person {
name: String,
age: u32,
}
let person = Person { name: "Alice".to_string(), age: 30 };
let json = to_string(&person);
let parsed: Person = from_str(&json).unwrap();
assert_eq!(person, parsed);Re-exports§
pub use writer::JsonWriter;
Modules§
- writer
- High-performance JSON writer
Structs§
- Json
Parser - High-performance JSON parser
Enums§
Traits§
- Json
Deserialize - Trait for types that can be deserialized from JSON
- Json
Serialize - Trait for types that can be serialized to JSON
Functions§
- from_
bytes - Deserialize a value from JSON bytes
- from_
str - Deserialize a value from a JSON string
- parse
- Parse JSON into a dynamic value
- to_
string - Serialize a value to a JSON string
- to_
string_ pretty - Serialize a value to a JSON string with pretty printing
Type Aliases§
- Result
- Result type alias for JSON operations
Derive Macros§
- Json
- Combined derive for both serialization and deserialization
- Json
Deserialize - Derive macro for JSON deserialization
- Json
Serialize - Derive macro for JSON serialization