-
Notifications
You must be signed in to change notification settings - Fork 18.3k
Closed
Closed
Copy link
Labels
DocumentationIssues describing a change to documentation.Issues describing a change to documentation.FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.
Milestone
Description
Proposal Details
The encoding/json Encoder outputs JSON values as single lines of text since its original version and this is a design choice (see @rsc claim). This makes it an early implementation of the JSON Lines standard.
However this feature is undocumented: nothing about the absence of \n
in doc for Encoder
, Encoder.Encode
(or json.Marshal
). As this is undocumented, users can't rely on this implementation detail (but I expect many rely on it anyway).
This proposal is about extending the Encoder.Encode
documentation to guarantee that no raw \n
or \r
is produced inside a JSON value.
Metadata
Metadata
Assignees
Labels
DocumentationIssues describing a change to documentation.Issues describing a change to documentation.FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.