Dmitry Zenovich
Dmitry Zenovich
@dsnet Can you look at https://go.dev/cl/606495 please? As the new consistent marshalling can be turned off with a GODEBUG setting, now it should be no risk to break programs depending...
@ianlancetaylor Have you tried setting `GODEBUG=jsoninconsistentmarshal=1`?
@ianlancetaylor Actually, the the broken tests I see so far are those checking the full compatibility (encoding to the exactly same bytes) with the current (broken) version of encoding/json. A...
@ianlancetaylor, would it help if we set `GODEBUG=jsoninconsistentmarshal=1` by default? This way, people interested in correct marshalling would be able to turn it on explicitly, so there would be no...
@ianlancetaylor, Ah, that really makes sense. How could we do it correctly then?
@ianlancetaylor, I believe it's impossible to fix a bug and keep the bug unfixed at the same time. Of course, tests of the libraries intentionally mocking the broken behaviour for...
@dsnet, Doing this way can take many years. The discussion about `encoding/json/v2` started in October 2023 (https://github.com/golang/go/discussions/63397), but it's still at the proposal formulation stage (discussable draft) after one year...
At the same time, the bug is still the source of problems for end users, they are trying to find ways avoiding usage of the standard `encoding` library: https://github.com/go-chi/render/pull/47
Probably we could add the new method into the interface introduced in #1454 to allow calling it from outside easier.