diff --git a/src/pkg/encoding/json/encode.go b/src/pkg/encoding/json/encode.go index 5425a3a90a1..edbafcf65f1 100644 --- a/src/pkg/encoding/json/encode.go +++ b/src/pkg/encoding/json/encode.go @@ -43,7 +43,8 @@ import ( // to keep some browsers from misinterpreting JSON output as HTML. // // Array and slice values encode as JSON arrays, except that -// []byte encodes as a base64-encoded string. +// []byte encodes as a base64-encoded string, and a nil slice +// encodes as the null JSON object. // // Struct values encode as JSON objects. Each exported struct field // becomes a member of the object unless