Golang slice of structs

Golang slice of structs It's not uncommon for public JSON APIs to reply with top level arrays, instead of a full JSON object. If you want to convert that JSON array into a slice of structs with the items of the array, heres how you can do it: package main import "fmt" import "encoding/json" type PublicKey struct { Id int Key string } type KeysResponse struct { Collection ................
................