this post was submitted on 08 Sep 2023
0 points (50.0% liked)
Rust
6044 readers
5 users here now
Welcome to the Rust community! This is a place to discuss about the Rust programming language.
Wormhole
Credits
- The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
What are you deserializing into? Minimum reproducible Code would be best. That means a main.rs file with a main method and no dependencies, which prints your error when run. Then you can simply share it on the rust playground or ideone.com.
I believe the JSON you have given us is invalid. Either the outer most parentheses must be [] instead of {}, or the nation and the list must get a name, i.e.
"nation" = {"id"= 1, "country"="USA"}, "people"= []