mirror of
https://github.com/serde-rs/serde.git
synced 2025-10-02 07:21:12 +00:00
add Hjson
This commit is contained in:
parent
13e1a129dd
commit
80a27cbb4a
@ -358,7 +358,7 @@ impl serde::Serialize for i32 {
|
|||||||
As you can see it's pretty simple. More complex types like `BTreeMap` need to
|
As you can see it's pretty simple. More complex types like `BTreeMap` need to
|
||||||
pass a
|
pass a
|
||||||
[MapVisitor](http://serde-rs.github.io/serde/serde/serde/ser/trait.MapVisitor.html)
|
[MapVisitor](http://serde-rs.github.io/serde/serde/serde/ser/trait.MapVisitor.html)
|
||||||
to the
|
to the
|
||||||
[Serializer](http://serde-rs.github.io/serde/serde/serde/ser/trait.Serializer.html)
|
[Serializer](http://serde-rs.github.io/serde/serde/serde/ser/trait.Serializer.html)
|
||||||
in order to walk through the type:
|
in order to walk through the type:
|
||||||
|
|
||||||
@ -519,7 +519,7 @@ impl serde::de::Visitor for I32Visitor {
|
|||||||
Since it's possible for this type to get passed an unexpected type, we need a
|
Since it's possible for this type to get passed an unexpected type, we need a
|
||||||
way to error out. This is done by way of the
|
way to error out. This is done by way of the
|
||||||
[Error](http://serde-rs.github.io/serde/serde/serde/de/trait.Error.html) trait,
|
[Error](http://serde-rs.github.io/serde/serde/serde/de/trait.Error.html) trait,
|
||||||
which allows a
|
which allows a
|
||||||
[Deserialize](http://serde-rs.github.io/serde/serde/serde/de/trait.Deserialize.html)
|
[Deserialize](http://serde-rs.github.io/serde/serde/serde/de/trait.Deserialize.html)
|
||||||
to generate an error for a few common error conditions. Here's how it could be used:
|
to generate an error for a few common error conditions. Here's how it could be used:
|
||||||
|
|
||||||
@ -538,7 +538,7 @@ to generate an error for a few common error conditions. Here's how it could be u
|
|||||||
|
|
||||||
Maps follow a similar pattern as before, and use a
|
Maps follow a similar pattern as before, and use a
|
||||||
[MapVisitor](http://serde-rs.github.io/serde/serde/serde/de/trait.MapVisitor.html)
|
[MapVisitor](http://serde-rs.github.io/serde/serde/serde/de/trait.MapVisitor.html)
|
||||||
to walk through the values generated by the
|
to walk through the values generated by the
|
||||||
[Deserializer](http://serde-rs.github.io/serde/serde/serde/de/trait.Deserializer.html).
|
[Deserializer](http://serde-rs.github.io/serde/serde/serde/de/trait.Deserializer.html).
|
||||||
|
|
||||||
```rust,ignore
|
```rust,ignore
|
||||||
@ -825,6 +825,7 @@ Serialization Formats Using Serde
|
|||||||
| ------ | ---- |
|
| ------ | ---- |
|
||||||
| Bincode | [bincode](https://crates.io/crates/bincode) |
|
| Bincode | [bincode](https://crates.io/crates/bincode) |
|
||||||
| env vars | [envy](https://crates.io/crates/envy) |
|
| env vars | [envy](https://crates.io/crates/envy) |
|
||||||
|
| Hjson | [serde\_hjson](https://crates.io/crates/serde-hjson) |
|
||||||
| JSON | [serde\_json](https://crates.io/crates/serde_json) |
|
| JSON | [serde\_json](https://crates.io/crates/serde_json) |
|
||||||
| MessagePack | [rmp](https://crates.io/crates/rmp) |
|
| MessagePack | [rmp](https://crates.io/crates/rmp) |
|
||||||
| XML | [serde\_xml](https://github.com/serde-rs/xml) |
|
| XML | [serde\_xml](https://github.com/serde-rs/xml) |
|
||||||
|
Loading…
x
Reference in New Issue
Block a user