mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-29 19:57:56 +00:00
Fix references to serde::json
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
//! encode structured data in a text format that can be easily read by humans. Its simple syntax
|
||||
//! and native compatibility with JavaScript have made it a widely used format.
|
||||
//!
|
||||
//! Data types that can be encoded are JavaScript types (see the `serde::json:Value` enum for more
|
||||
//! Data types that can be encoded are JavaScript types (see the `serde_json:Value` enum for more
|
||||
//! details):
|
||||
//!
|
||||
//! * `Boolean`: equivalent to rust's `bool`
|
||||
@@ -16,7 +16,7 @@
|
||||
//! * `String`: equivalent to rust's `String`
|
||||
//! * `Array`: equivalent to rust's `Vec<T>`, but also allowing objects of different types in the
|
||||
//! same array
|
||||
//! * `Object`: equivalent to rust's `BTreeMap<String, serde::json::Value>`
|
||||
//! * `Object`: equivalent to rust's `BTreeMap<String, serde_json::Value>`
|
||||
//! * `Null`
|
||||
//!
|
||||
//! An object is a series of string keys mapping to values, in `"key": value` format. Arrays are
|
||||
@@ -48,8 +48,8 @@
|
||||
//! `serde::Deserialize` trait. Serde provides provides an annotation to automatically generate
|
||||
//! the code for these traits: `#[derive(Serialize, Deserialize)]`.
|
||||
//!
|
||||
//! The JSON API also provides an enum `serde::json::Value` and a method `to_value` to serialize
|
||||
//! objects. A `serde::json::Value` value can be serialized as a string or buffer using the
|
||||
//! The JSON API also provides an enum `serde_json::Value` and a method `to_value` to serialize
|
||||
//! objects. A `serde_json::Value` value can be serialized as a string or buffer using the
|
||||
//! functions described above. You can also use the `json::Serializer` object, which implements the
|
||||
//! `Serializer` trait.
|
||||
//!
|
||||
@@ -63,7 +63,7 @@
|
||||
//!
|
||||
//! extern crate serde;
|
||||
//!
|
||||
//! use serde::json::{self, Value};
|
||||
//! use serde_json::{self, Value};
|
||||
//!
|
||||
//! fn main() {
|
||||
//! let data: Value = json::from_str("{\"foo\": 13, \"bar\": \"baz\"}").unwrap();
|
||||
|
||||
Reference in New Issue
Block a user