https://pkg.go.dev/encoding/json#Indent:
[...] trailing space characters at the end of src are preserved and copied to dst. For example, if src has no trailing spaces, neither will dst; if src ends in a trailing newline, so will dst.
When GOEXPERIMENT=jsonv2, encoding/json.Indent
no longer preserves trailing whitespace, contrary to the documentation.