Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
encoding/json: Compact should be consistent with escaping #34070
As requested by @mvdan I'm filing an issue to decide on the escaping behaviour of
#30357 was originally filed as
The options seem to be:
I think each of the options has merit, except doing nothing. In #30357 I complained that Compact behaved surprisingly, doing more than what was documented, and returning a less compact result in contrast to what the function name implied. Doing nothing means that issue persists.
As for the three other options I think:
I agree that we need to do something here.
I think the best solution is to stop doing any escaping at all. Like others have mentioned in this thread, that's what is documented,
I doubt that any programs would break. If any was depending on undocumented behavior, one could argue that their program should have been using
My opinion is that we can give this a try in the current cycle for 1.14, and reconsider or revert if a large amount of users complains once it lands in master or in any of the pre-releases. I'm happy to review a CL.