mirror of
https://codeberg.org/icewind/vdf-reader.git
synced 2026-06-03 10:04:08 +02:00
flake reorg
This commit is contained in:
parent
d68275218b
commit
2ccd57d27e
4 changed files with 82 additions and 212 deletions
33
README.md
33
README.md
|
|
@ -12,22 +12,22 @@ This crate implements a deserializer for serde, but because VDF doesn't map that
|
|||
|
||||
- Because the boolean values `0` and `1` can't be distinguished from numbers, it is not possible to use booleans in untagged enums.
|
||||
- When deserializing arrays by settings the same key multiple times, the keys have to be consecutive.
|
||||
```vdf
|
||||
key: 1
|
||||
key: 2
|
||||
other: 3
|
||||
```
|
||||
|
||||
will work, but
|
||||
```vdf
|
||||
key: 1
|
||||
other: 3
|
||||
key: 2
|
||||
```
|
||||
|
||||
will not.
|
||||
|
||||
|
||||
```vdf
|
||||
key: 1
|
||||
key: 2
|
||||
other: 3
|
||||
```
|
||||
|
||||
will work, but
|
||||
|
||||
```vdf
|
||||
key: 1
|
||||
other: 3
|
||||
key: 2
|
||||
```
|
||||
|
||||
will not.
|
||||
|
||||
### Tagged enum root
|
||||
|
||||
|
|
@ -48,6 +48,7 @@ or
|
|||
```
|
||||
|
||||
can be deserialized into a
|
||||
|
||||
```rust
|
||||
enum Data {
|
||||
Variant1 {
|
||||
|
|
@ -57,4 +58,4 @@ enum Data {
|
|||
other: String,
|
||||
}
|
||||
}
|
||||
```
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue