Advertisement
Guest User

Untitled

a guest
Jun 26th, 2016
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. #[derive(Clone, Debug, Deserialize)]
  2. struct WebResponse {
  3. foo: Vec<Structs>,
  4. }
  5.  
  6. enum Structs {
  7. Foo(Foo),
  8. Bar(Bar),
  9. }
  10.  
  11. #[derive(Clone, Debug, Deserialize)]
  12. struct Foo {
  13. name: String,
  14. baz: Vec<String>,
  15. }
  16.  
  17. #[derive(Clone, Debug, Deserialize)]
  18. struct Bar {
  19. quux: u64
  20. }
  21.  
  22. {
  23. "foo": [
  24. {
  25. "name": "John",
  26. "baz": ["Lorem", "Ipsum"]
  27. },
  28. {
  29. "quux": 17
  30. }
  31. ]
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement