I’m curious why unmarshal is seeing objects in the devices array (the count of nested Devices matches the input) but not capable of decoding any data into the structs (e.g. all values are empty except the root level.)
Is the JSON malformed or am I just messing up the struct definitions somehow? Is there a way to get better insight into how unmarshal actually interprets this JSON?
At a quick glance the first problem I see is private fields in the json input (lowercase field names).
You will need struct tags to unmarshal those.
Take a look at this quick example: https://play.golang.org/p/JdWl2WImI4