草庐IT

applicationUUID

全部标签

json - Golang - 使用更改键值解码 JSON

我正在尝试将JSON解码为一个结构,但事实证明这很困难,因为外部JSON键发生了变化,而我一周前才开始。这是我的手动尝试:import("encoding/json""fmt""strconv")typeDevicestruct{localUUIDstringapplicationUUIDstringexternalUUIDstringcommitstringlastSeenstringstatestringprogressfloat32}funcmain(){devices:=make([]*Device,0,10)b:=[]byte(`{"5417871461137421886":

json - Golang - 使用更改键值解码 JSON

我正在尝试将JSON解码为一个结构,但事实证明这很困难,因为外部JSON键发生了变化,而我一周前才开始。这是我的手动尝试:import("encoding/json""fmt""strconv")typeDevicestruct{localUUIDstringapplicationUUIDstringexternalUUIDstringcommitstringlastSeenstringstatestringprogressfloat32}funcmain(){devices:=make([]*Device,0,10)b:=[]byte(`{"5417871461137421886":