Skip to content

Commit 667ea72

Browse files
committed
review: Update crates-io.md
1 parent 3deb089 commit 667ea72

File tree

1 file changed

+8
-32
lines changed

1 file changed

+8
-32
lines changed

serde_core/crates-io.md

Lines changed: 8 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,21 @@
11
<!-- Serde readme rendered on crates.io -->
22

3-
**Serde is a framework for *ser*ializing and *de*serializing Rust data structures efficiently and generically.**
3+
**Serde Core is a collection of core functionalities and abstractions for Serde, a framework for *ser*ializing and *de*serializing Rust data structures efficiently and generically.**
44

55
---
66

7+
Serde Core exposes core traits and utilities for interacting with Serde's data model.
8+
It is intended to be consumed by Serde's data formats and other crates that implement the Serde traits by hand.
9+
If you are looking to use Serde in your library/application to simply serialize and deserialize data, you most likely want to use [Serde](https://crates.io/crates/serde) directly.
10+
Serde Core does _not_ offer any convenience functions for automatically implementing `Serialize` or `Deserialize` via a `#[derive]` macro.
11+
712
You may be looking for:
813

14+
- [API documentation](https://docs.rs/serde_core)
915
- [An overview of Serde](https://serde.rs/)
1016
- [Data formats supported by Serde](https://serde.rs/#data-formats)
11-
- [Setting up `#[derive(Serialize, Deserialize)]`](https://serde.rs/derive.html)
1217
- [Examples](https://serde.rs/examples.html)
13-
- [API documentation](https://docs.rs/serde)
14-
- [Release notes](https://github.com/serde-rs/serde/releases)
15-
16-
## Serde in action
17-
18-
```rust
19-
use serde::{Deserialize, Serialize};
20-
21-
#[derive(Serialize, Deserialize, Debug)]
22-
struct Point {
23-
x: i32,
24-
y: i32,
25-
}
26-
27-
fn main() {
28-
let point = Point { x: 1, y: 2 };
29-
30-
// Convert the Point to a JSON string.
31-
let serialized = serde_json::to_string(&point).unwrap();
32-
33-
// Prints serialized = {"x":1,"y":2}
34-
println!("serialized = {}", serialized);
35-
36-
// Convert the JSON string back to a Point.
37-
let deserialized: Point = serde_json::from_str(&serialized).unwrap();
38-
39-
// Prints deserialized = Point { x: 1, y: 2 }
40-
println!("deserialized = {:?}", deserialized);
41-
}
42-
```
18+
- [Release notes](https://github.com/serde-rs/serde_core/releases)
4319

4420
## Getting help
4521

0 commit comments

Comments
 (0)