Skip to content

Commit 3e52430

Browse files
committed
feat: support prelude for json traits
1 parent 9c42a68 commit 3e52430

File tree

5 files changed

+12
-3
lines changed

5 files changed

+12
-3
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "sonic-rs"
3-
version = "0.3.1"
3+
version = "0.3.2"
44
authors = ["Volo Team <[email protected]>"]
55
edition = "2021"
66
description = "Sonic-rs is a fast Rust JSON library based on SIMD"

fuzz/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,5 @@ pub use crate::value::{
4040
from_value, to_value, Array, JsonContainerTrait, JsonType, JsonValueMutTrait, JsonValueTrait,
4141
Object, Value, ValueRef,
4242
};
43+
44+
pub mod prelude;

src/prelude.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
//! Imports the various traits about JSON. `use sonic_rs::prelude::*`` to make the
2+
//! various traits and methods imported if you need.
3+
4+
pub use crate::{
5+
serde::JsonNumberTrait,
6+
value::{JsonContainerTrait, JsonValueMutTrait, JsonValueTrait},
7+
};

0 commit comments

Comments
 (0)