Is this intended behaviour for json.Unmarshal, json.Decoder.Decode & co.?
Additionally, if this is intended behaviour the json.Decoder.Decode example at golang.org might need fixing. It currently shows the following example which will exhibit incorrect results if either Name or Text is null: http://play.golang.org/p/wfoi8On0DX
I believe this is working as intended and documented.
Unmarshaling null into a string intentionally does not change the string:
The JSON null value unmarshals into an interface, map, pointer, or slice by setting that Go value to nil. Because null is often used in JSON to mean “not present,” unmarshaling a JSON null into any other Go type has no effect on the value and produces no error.