unions are easy too, sorta

This commit is contained in:
Ben Kraft
2020-07-15 17:35:47 -07:00
parent d089ab1afb
commit 6f0e5fdf0d
6 changed files with 22 additions and 13 deletions
+6 -8
View File
@@ -1,12 +1,10 @@
type Response struct {
Root struct {
Id string `json:"id"`
Name string `json:"name"`
Children []content `json:"children"`
Id string `json:"id"`
Name string `json:"name"`
Children []struct {
Id string `json:"id"`
Name string `json:"name"`
} `json:"children"`
} `json:"root"`
}
type content struct {
Id string `json:"id"`
Name string `json:"name"`
}