Skip to content

Commit

Permalink
feat: support prelude for json traits
Browse files Browse the repository at this point in the history
  • Loading branch information
liuq19 committed Jan 11, 2024
1 parent 9c42a68 commit 3e52430
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "sonic-rs"
version = "0.3.1"
version = "0.3.2"
authors = ["Volo Team <[email protected]>"]
edition = "2021"
description = "Sonic-rs is a fast Rust JSON library based on SIMD"
Expand Down
2 changes: 1 addition & 1 deletion fuzz/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,5 @@ pub use crate::value::{
from_value, to_value, Array, JsonContainerTrait, JsonType, JsonValueMutTrait, JsonValueTrait,
Object, Value, ValueRef,
};

pub mod prelude;
7 changes: 7 additions & 0 deletions src/prelude.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
//! Imports the various traits about JSON. `use sonic_rs::prelude::*`` to make the
//! various traits and methods imported if you need.
pub use crate::{
serde::JsonNumberTrait,
value::{JsonContainerTrait, JsonValueMutTrait, JsonValueTrait},
};

0 comments on commit 3e52430

Please sign in to comment.