Skip to content

Commit

Permalink
Merge pull request 778 from jayeshmann/patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed May 16, 2021
2 parents 8604ef9 + 9cbdfc8 commit 9e45712
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,11 @@ A string of JSON data can be parsed into a `serde_json::Value` by the
[`from_reader`][from_reader] for parsing from any `io::Read` like a File or
a TCP stream.

<div align="right">
<a href="https://play.rust-lang.org/?edition=2018&gist=d69d8e3156d4bb81c4461b60b772ab72" target="_blank">
<img align="right" width="50" src="https://github.com/raw/serde-rs/serde-rs.github.io/master/img/run.png">
<img width="50" src="https://github.com/raw/serde-rs/serde-rs.github.io/master/img/run.png">
</a>
</div>

```rust
use serde_json::{Result, Value};
Expand Down Expand Up @@ -139,9 +141,11 @@ in one of the dozens of places it is used in your code.
Serde provides a powerful way of mapping JSON data into Rust data structures
largely automatically.

<div align="right">
<a href="https://play.rust-lang.org/?edition=2018&gist=15cfab66d38ff8a15a9cf1d8d897ac68" target="_blank">
<img align="right" width="50" src="https://github.com/raw/serde-rs/serde-rs.github.io/master/img/run.png">
<img width="50" src="https://github.com/raw/serde-rs/serde-rs.github.io/master/img/run.png">
</a>
</div>

```rust
use serde::{Deserialize, Serialize};
Expand Down Expand Up @@ -206,9 +210,11 @@ derive]* page of the Serde site.
Serde JSON provides a [`json!` macro][macro] to build `serde_json::Value`
objects with very natural JSON syntax.

<div align="right">
<a href="https://play.rust-lang.org/?edition=2018&gist=6ccafad431d72b62e77cc34c8e879b24" target="_blank">
<img align="right" width="50" src="https://github.com/raw/serde-rs/serde-rs.github.io/master/img/run.png">
<img width="50" src="https://github.com/raw/serde-rs/serde-rs.github.io/master/img/run.png">
</a>
</div>

```rust
use serde_json::json;
Expand Down Expand Up @@ -239,9 +245,11 @@ be interpolated directly into the JSON value as you are building it. Serde
will check at compile time that the value you are interpolating is able to
be represented as JSON.

<div align="right">
<a href="https://play.rust-lang.org/?edition=2018&gist=f9101a6e61dfc9e02c6a67f315ed24f2" target="_blank">
<img align="right" width="50" src="https://github.com/raw/serde-rs/serde-rs.github.io/master/img/run.png">
<img width="50" src="https://github.com/raw/serde-rs/serde-rs.github.io/master/img/run.png">
</a>
</div>

```rust
let full_name = "John Doe";
Expand Down Expand Up @@ -270,9 +278,11 @@ A data structure can be converted to a JSON string by
[`serde_json::to_writer`][to_writer] which serializes to any `io::Write`
such as a File or a TCP stream.

<div align="right">
<a href="https://play.rust-lang.org/?edition=2018&gist=3472242a08ed2ff88a944f2a2283b0ee" target="_blank">
<img align="right" width="50" src="https://github.com/raw/serde-rs/serde-rs.github.io/master/img/run.png">
<img width="50" src="https://github.com/raw/serde-rs/serde-rs.github.io/master/img/run.png">
</a>
</div>

```rust
use serde::{Deserialize, Serialize};
Expand Down

0 comments on commit 9e45712

Please sign in to comment.