Skip to content
This repository was archived by the owner on Dec 1, 2023. It is now read-only.

Commit 132c6f4

Browse files
committed
Fix a typo and wrap some lines
Closes #24
1 parent 2ff7f6c commit 132c6f4

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

src/json.rs

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,26 @@
1919
//! # What is JSON?
2020
//!
2121
//! JSON (JavaScript Object Notation) is a way to write data in Javascript.
22-
//! Like XML, it allows to encode structured data in a text format that can be easily read by humans
23-
//! Its simple syntax and native compatibility with JavaScript have made it a widely used format.
22+
//! Like XML, it allows to encode structured data in a text format that can be
23+
//! easily read by humans Its simple syntax and native compatibility with
24+
//! JavaScript have made it a widely used format.
2425
//!
25-
//! Data types that can be encoded are JavaScript types (see the `Json` enum for more details):
26+
//! Data types that can be encoded are JavaScript types (see the `Json` enum
27+
//! for more details):
2628
//!
2729
//! * `Boolean`: equivalent to rust's `bool`
2830
//! * `Number`: equivalent to rust's `f64`
2931
//! * `String`: equivalent to rust's `String`
30-
//! * `Array`: equivalent to rust's `Vec<T>`, but also allowing objects of different types in the
32+
//! * `Array`: equivalent to rust's `Vec<T>`, but also allowing objects of
33+
//! different types in the
3134
//! same array
32-
//! * `Object`: equivalent to rust's `Treemap<String, json::Json>`
35+
//! * `Object`: equivalent to rust's `BTreeMap<String, json::Json>`
3336
//! * `Null`
3437
//!
35-
//! An object is a series of string keys mapping to values, in `"key": value` format.
36-
//! Arrays are enclosed in square brackets ([ ... ]) and objects in curly brackets ({ ... }).
37-
//! A simple JSON document encoding a person, his/her age, address and phone numbers could look like
38+
//! An object is a series of string keys mapping to values, in `"key": value`
39+
//! format. Arrays are enclosed in square brackets ([ ... ]) and objects in
40+
//! curly brackets ({ ... }). A simple JSON document encoding a person,
41+
//! his/her age, address and phone numbers could look like
3842
//!
3943
//! ```ignore
4044
//! {
@@ -84,7 +88,8 @@
8488
//! extern crate "rustc-serialize" as rustc_serialize;
8589
//! use rustc_serialize::json;
8690
//!
87-
//! // Automatically generate `RustcDecodable` and `RustcEncodable` trait implementations
91+
//! // Automatically generate `RustcDecodable` and `RustcEncodable` trait
92+
//! // implementations
8893
//! #[derive(RustcDecodable, RustcEncodable)]
8994
//! pub struct TestStruct {
9095
//! data_int: u8,

0 commit comments

Comments
 (0)