Skip to content

Commit 1ceb2bb

Browse files
bors[bot]r-marques
andcommitted
8: Align with the api provided by serde_json r=japaric a=r-marques - Re-export to_* and from_* methods in the root of the crate - Added a rust-toolchain file to set rustup to nightly by default - Update README to make it explicit there is a crate published in crates.io This merge request makes it easier to replace `serde_json` with `serde_json_core` when building with no_std. Example: ```rust #[cfg(not(feature = "std"))] use serde_json_core as serde_json; let deserialized = serde_json::from_str("...").unwrap(); ``` Co-authored-by: Rodolphe Marques <marques.rodolphe@gmail.com>
2 parents 9241d44 + 48a7e16 commit 1ceb2bb

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
55
[`serde-json`]: https://crates.io/crates/serde_json
66

7+
```toml
8+
[dependencies]
9+
serde-json-core = "0.0.1"
10+
```
11+
712
## [Documentation](https://japaric.github.io/serde-json-core/serde_json_core/)
813

914
## License

rust-toolchain

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nightly

src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,8 @@ extern crate serde_derive;
6262

6363
pub mod de;
6464
pub mod ser;
65+
66+
#[doc(inline)]
67+
pub use self::de::{from_slice, from_str};
68+
#[doc(inline)]
69+
pub use self::ser::{to_string, to_vec};

0 commit comments

Comments
 (0)