@@ -81,9 +81,11 @@ A string of JSON data can be parsed into a `serde_json::Value` by the
81
81
[ ` from_reader ` ] [ from_reader ] for parsing from any ` io::Read ` like a File or
82
82
a TCP stream.
83
83
84
+ <div align =" right " >
84
85
<a href =" https://play.rust-lang.org/?edition=2018&gist=d69d8e3156d4bb81c4461b60b772ab72 " target =" _blank " >
85
- <img align = " right " width =" 50 " src =" https://raw.githubusercontent.com/serde-rs/serde-rs.github.io/master/img/run.png " >
86
+ <img width =" 50 " src =" https://raw.githubusercontent.com/serde-rs/serde-rs.github.io/master/img/run.png " >
86
87
</a >
88
+ </div >
87
89
88
90
``` rust
89
91
use serde_json :: {Result , Value };
@@ -139,9 +141,11 @@ in one of the dozens of places it is used in your code.
139
141
Serde provides a powerful way of mapping JSON data into Rust data structures
140
142
largely automatically.
141
143
144
+ <div align =" right " >
142
145
<a href =" https://play.rust-lang.org/?edition=2018&gist=15cfab66d38ff8a15a9cf1d8d897ac68 " target =" _blank " >
143
- <img align = " right " width =" 50 " src =" https://raw.githubusercontent.com/serde-rs/serde-rs.github.io/master/img/run.png " >
146
+ <img width =" 50 " src =" https://raw.githubusercontent.com/serde-rs/serde-rs.github.io/master/img/run.png " >
144
147
</a >
148
+ </div >
145
149
146
150
``` rust
147
151
use serde :: {Deserialize , Serialize };
@@ -206,9 +210,11 @@ derive]* page of the Serde site.
206
210
Serde JSON provides a [ ` json! ` macro] [ macro ] to build ` serde_json::Value `
207
211
objects with very natural JSON syntax.
208
212
213
+ <div align =" right " >
209
214
<a href =" https://play.rust-lang.org/?edition=2018&gist=6ccafad431d72b62e77cc34c8e879b24 " target =" _blank " >
210
- <img align = " right " width =" 50 " src =" https://raw.githubusercontent.com/serde-rs/serde-rs.github.io/master/img/run.png " >
215
+ <img width =" 50 " src =" https://raw.githubusercontent.com/serde-rs/serde-rs.github.io/master/img/run.png " >
211
216
</a >
217
+ </div >
212
218
213
219
``` rust
214
220
use serde_json :: json;
@@ -239,9 +245,11 @@ be interpolated directly into the JSON value as you are building it. Serde
239
245
will check at compile time that the value you are interpolating is able to
240
246
be represented as JSON.
241
247
248
+ <div align =" right " >
242
249
<a href =" https://play.rust-lang.org/?edition=2018&gist=f9101a6e61dfc9e02c6a67f315ed24f2 " target =" _blank " >
243
- <img align = " right " width =" 50 " src =" https://raw.githubusercontent.com/serde-rs/serde-rs.github.io/master/img/run.png " >
250
+ <img width =" 50 " src =" https://raw.githubusercontent.com/serde-rs/serde-rs.github.io/master/img/run.png " >
244
251
</a >
252
+ </div >
245
253
246
254
``` rust
247
255
let full_name = " John Doe" ;
@@ -270,9 +278,11 @@ A data structure can be converted to a JSON string by
270
278
[ ` serde_json::to_writer ` ] [ to_writer ] which serializes to any ` io::Write `
271
279
such as a File or a TCP stream.
272
280
281
+ <div align =" right " >
273
282
<a href =" https://play.rust-lang.org/?edition=2018&gist=3472242a08ed2ff88a944f2a2283b0ee " target =" _blank " >
274
- <img align = " right " width =" 50 " src =" https://raw.githubusercontent.com/serde-rs/serde-rs.github.io/master/img/run.png " >
283
+ <img width =" 50 " src =" https://raw.githubusercontent.com/serde-rs/serde-rs.github.io/master/img/run.png " >
275
284
</a >
285
+ </div >
276
286
277
287
``` rust
278
288
use serde :: {Deserialize , Serialize };
0 commit comments