1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

doc: document json anonymous struct fields

This commit is contained in:
Alexander Medvednikov 2023-03-28 22:55:24 +02:00
parent 1f613a082a
commit ed21097a91

View File

@ -4303,6 +4303,9 @@ println(json.encode(data)) // {"x":42,"y":360}
println(json.encode(user)) // {"name":"Pierre","score":1024}
```
The json module also supports anonymous struct fields, which helps with complex JSON apis with lots
of levels.
## Testing
### Asserts