Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #[derive(Clone, Debug, Deserialize)]
- struct WebResponse {
- foo: Vec<Structs>,
- }
- enum Structs {
- Foo(Foo),
- Bar(Bar),
- }
- #[derive(Clone, Debug, Deserialize)]
- struct Foo {
- name: String,
- baz: Vec<String>,
- }
- #[derive(Clone, Debug, Deserialize)]
- struct Bar {
- quux: u64
- }
- {
- "foo": [
- {
- "name": "John",
- "baz": ["Lorem", "Ipsum"]
- },
- {
- "quux": 17
- }
- ]
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement