, uint8, uint8 - byte (Spec: ). - Base64, , ("AQIDBA==" - Base64 [1, 2, 3, 4]).
json.Marhsal() doc:
JSON, , [] base64, JSON.
uint int, , .
(Go Playground):
type MyStruct struct {
Data []uint
}
d := new(MyStruct)
d.Data = []uint{1, 2, 3, 4}
data, err := json.Marshal(d)
fmt.Println(string(data), err)
:
{"Data":[1,2,3,4]} <nil>