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
Having an app serialize structs with json.Encode.Encode() to write the data to an io.Writer. Running tests with json.Marshal I noticed that the generated data differs: json.Encoder.Encode() adds a newline at the end while json.Marshal does not. Is this intended? Is this a bug?
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Having an app serialize structs with
json.Encode.Encode()
to write the data to anio.Writer
. Running tests withjson.Marshal
I noticed that the generated data differs:json.Encoder.Encode()
adds a newline at the end whilejson.Marshal
does not. Is this intended? Is this a bug?Example
What did you expect to see?
They have the same output.
What did you see instead?
They do not have the same output.
The text was updated successfully, but these errors were encountered: