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
|
||||
pass a
|
||||
[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)
|
||||
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
|
||||
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,
|
||||
which allows a
|
||||
which allows a
|
||||
[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:
|
||||
|
||||
@ -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
|
||||
[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).
|
||||
|
||||
```rust,ignore
|
||||
@ -825,6 +825,7 @@ Serialization Formats Using Serde
|
||||
| ------ | ---- |
|
||||
| Bincode | [bincode](https://crates.io/crates/bincode) |
|
||||
| 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) |
|
||||
| MessagePack | [rmp](https://crates.io/crates/rmp) |
|
||||
| XML | [serde\_xml](https://github.com/serde-rs/xml) |
|
||||
|
Loading…
Reference in New Issue
Block a user