Skip to content
Myr

crates-io.md

This file

Path

crates-io.md

65 lines · 2.5 KiB · Markdown

Last changed by

Link to serde.rs without trailing slashDavid Tolnaybefore adoption263a1db

History of this file

Take it

The walk stopped after 200 commits: lines older than 3761854 point at it.

Merge pull request #2745 from dtolnay/docsrsDavid Tolnaybefore adoption3761854

lines 1–8why, one step back
1<!-- Serde readme rendered on crates.io -->
23**Serde is a framework for *ser*ializing and *de*serializing Rust data structures efficiently and generically.**45---67You may be looking for:8

Link to serde.rs without trailing slashDavid Tolnaybefore adoption263a1db

line 9why, one step back
9- [An overview of Serde](https://serde.rs)

Merge pull request #2745 from dtolnay/docsrsDavid Tolnaybefore adoption3761854

lines 10–48why, one step back
10- [Data formats supported by Serde](https://serde.rs/#data-formats)
11- [Setting up `#[derive(Serialize, Deserialize)]`](https://serde.rs/derive.html)12- [Examples](https://serde.rs/examples.html)13- [API documentation](https://docs.rs/serde)14- [Release notes](https://github.com/serde-rs/serde/releases)1516## Serde in action1718```rust19use serde::{Deserialize, Serialize};2021#[derive(Serialize, Deserialize, Debug)]22struct Point {23 x: i32,24 y: i32,25}2627fn main() {28 let point = Point { x: 1, y: 2 };2930 // Convert the Point to a JSON string.31 let serialized = serde_json::to_string(&point).unwrap();3233 // Prints serialized = {"x":1,"y":2}34 println!("serialized = {}", serialized);3536 // Convert the JSON string back to a Point.37 let deserialized: Point = serde_json::from_str(&serialized).unwrap();3839 // Prints deserialized = Point { x: 1, y: 2 }40 println!("deserialized = {:?}", deserialized);41}42```4344## Getting help4546Serde is one of the most widely used Rust libraries so any place that Rustaceans47congregate will be able to help you out. For chat, consider trying the48[#rust-questions] or [#rust-beginners] channels of the unofficial community

Merge pull request #2754 from bm-w/masterDavid Tolnaybefore adoptiond577c4a

lines 49–50why, one step back
49Discord (invite: <https://discord.gg/rust-lang-community>), the [#rust-usage]
50or [#beginners] channels of the official Rust Project Discord (invite:

Merge pull request #2745 from dtolnay/docsrsDavid Tolnaybefore adoption3761854

lines 51–65why, one step back
51<https://discord.gg/rust-lang>), or the [#general][zulip] stream in Zulip. For
52asynchronous, consider the [\[rust\] tag on StackOverflow][stackoverflow], the53[/r/rust] subreddit which has a pinned weekly easy questions post, or the Rust54[Discourse forum][discourse]. It's acceptable to file a support issue in this55repo but they tend not to get as many eyes as any of the above and may get56closed without a response after some time.5758[#rust-questions]: https://discord.com/channels/273534239310479360/27421513641440051359[#rust-beginners]: https://discord.com/channels/273534239310479360/27354152281571328160[#rust-usage]: https://discord.com/channels/442252698964721669/44315087811169484861[#beginners]: https://discord.com/channels/442252698964721669/44823800973374261262[zulip]: https://rust-lang.zulipchat.com/#narrow/stream/122651-general63[stackoverflow]: https://stackoverflow.com/questions/tagged/rust64[/r/rust]: https://www.reddit.com/r/rust65[discourse]: https://users.rust-lang.org