Guest User

Untitled

a guest
Jan 18th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. [
  2. {
  3. "displayName": "MyApp01",
  4. <...>
  5. },
  6. {
  7. "displayName": "MyApp02",
  8. <...>
  9. }
  10. ]
  11.  
  12. import "encoding/json"
  13.  
  14. type Application struct {
  15. DisplayName string `json:"displayName"`
  16. }
  17.  
  18. type Applications []Application
  19.  
  20. func main() {
  21. var response []byte // assume this is filled with the json stuff
  22. var resource Applications
  23. err := json.Unmarshal(response, &resource)
  24. }
Add Comment
Please, Sign In to add comment