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.
The text was updated successfully, but these errors were encountered: