Created description on JSON example.

Added descriptions on parsed and instantiated JSON in Rust. Also explained that by using the assert_eq macro we are ensuring equivalence.
This commit is contained in:
Trent Spice 2017-02-25 12:59:24 -05:00 committed by GitHub
parent 7b88a53beb
commit ab0c1ea8f4

View file

@ -2,6 +2,10 @@
##JSON implementation in Rust:
The example below shows two simple ways to embed JSON in Rust.
The first method parses block JSON as a block using the parse method from the json crate. It then unwraps the parsed JSON.
The second method instantiates an object as JSON using the object macro. Key value relationships are easily set using `=>`
After demonstrating two simple ways to write JSON, the assert_eq macro ensures equivalence.
[![json][json-badge]][json]