Wrapped markdown code around assert_eq! macro

This commit is contained in:
Trent Spice 2017-02-25 13:01:40 -05:00 committed by GitHub
parent 6ec45fe16f
commit dfd355158c

View file

@ -5,7 +5,8 @@
The example below shows two simple ways to embed JSON 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 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 `=>`. 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.
After demonstrating two simple ways to write JSON, the `assert_eq!` macro ensures equivalence.
[![json][json-badge]][json] [![json][json-badge]][json]