• Home
  • Raw
  • Download

Lines Matching refs:serde_json

5 [Latest Version]: https://img.shields.io/crates/v/serde_json.svg
16 serde_json = "1.0"
21 - [JSON API documentation](https://docs.serde.rs/serde_json/)
65 representation. This data structure is [`serde_json::Value`][value].
78 A string of JSON data can be parsed into a `serde_json::Value` by the
79 [`serde_json::from_str`][from_str] function. There is also
89 use serde_json::{Result, Value};
103 // Parse the string of data into serde_json::Value.
104 let v: Value = serde_json::from_str(data)?;
128 [`as_str()`]: https://docs.serde.rs/serde_json/enum.Value.html#method.as_str
148 use serde_json::Result;
170 // same function as the one that produced serde_json::Value above, but
172 let p: Person = serde_json::from_str(data)?;
181 This is the same `serde_json::from_str` function as before, but this time we
195 `serde_json::Value` representation. And the Rust compiler can check that
206 Serde JSON provides a [`json!` macro][macro] to build `serde_json::Value`
214 use serde_json::json;
217 // The type of `john` is `serde_json::Value`
234 The `Value::to_string()` function converts a `serde_json::Value` into a
250 // The type of `john` is `serde_json::Value`
268 [`serde_json::to_string`][to_string]. There is also
269 [`serde_json::to_vec`][to_vec] which serializes to a `Vec<u8>` and
270 [`serde_json::to_writer`][to_writer] which serializes to any `io::Write`
279 use serde_json::Result;
295 let j = serde_json::to_string(&address)?;
341 As long as there is a memory allocator, it is possible to use serde_json without
347 serde_json = { version = "1.0", default-features = false, features = ["alloc"] }
355 [value]: https://docs.serde.rs/serde_json/value/enum.Value.html
356 [from_str]: https://docs.serde.rs/serde_json/de/fn.from_str.html
357 [from_slice]: https://docs.serde.rs/serde_json/de/fn.from_slice.html
358 [from_reader]: https://docs.serde.rs/serde_json/de/fn.from_reader.html
359 [to_string]: https://docs.serde.rs/serde_json/ser/fn.to_string.html
360 [to_vec]: https://docs.serde.rs/serde_json/ser/fn.to_vec.html
361 [to_writer]: https://docs.serde.rs/serde_json/ser/fn.to_writer.html
362 [macro]: https://docs.serde.rs/serde_json/macro.json.html