Closed
Description
What version of Go are you using (go version
)?
go version go1.10.2
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (go env
)?
linux/amd64
What did you do?
ls := []string{}
if err := json.Unmarshal([]byte("null"), &ls); err != nil {
fmt.Println(err)
}
fmt.Println(ls)
if result, err := json.Marshal(ls); err != nil {
fmt.Println(err)
} else {
fmt.Println(string(result))
}
What did you expect to see?
output:
[]
[]
What did you see instead?
output
[]
null