You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Terminate each value with a newline.
// This makes the output look a little nicer
// when debugging, and some kind of space
// is required if the encoded value was a number,
// so that the reader knows there aren't more
// digits coming.
e.WriteByte('\n')
So we always get a newline after the key and after the value:
{"id"
:"123456"
,"status"
:"active"
This could be avoided by using json.Marshal(), but json.Marshal doesn't support turning off HTML encoding. So in order to preserve BC, we need to have a helper that will strip the last byte from the encoded output.
The text was updated successfully, but these errors were encountered:
Current implementation:
encoder.Encode will always add a newline:
So we always get a newline after the key and after the value:
This could be avoided by using json.Marshal(), but json.Marshal doesn't support turning off HTML encoding. So in order to preserve BC, we need to have a helper that will strip the last byte from the encoded output.
The text was updated successfully, but these errors were encountered: