Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
encoding/json: document that when MarshalText is used, a JSON string is created #17743
The behavior of JSON marshaling when the MarshalText method is used isn't well-specified:
Note that it says that MarshalJSON is called "to produce JSON", but there's nothing indicating that MarshalText produces a JSON string (i.e., the value is escaped as a string and surrounding quotes are added).
Compare with the docs about UnmarshalText (docs added in 1.8):
I can send a CL later.