-
-
Notifications
You must be signed in to change notification settings - Fork 812
Change default for JsonWriteFeature.ESCAPE_FORWARD_SLASHES
to be true
for 3.0
#1200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Is it still an option to revert that change of default? Any kind of URL-like structure looking entirely different in the JSON output generated is likely to break millions of application clients that are not prepared to deal with the additional backslashes. I guess this could be mitigated on the integrator side, but I'm not sure if it's a good state of affairs, if half the world has to switch to the 2.x defaults through, for example, some reconfiguration which Spring Boot applies. Even more problematic: as this is a |
First things first: it is totally possible to change this, but for that I think we'd need a Poll Discussion: we've had some as you can see here: FasterXML/jackson-future-ideas#72 so if you could start one similar to existing ones, that'd be the way to go. That said, the reason for changing (as per #507) is that many other tools (notably GSON) by default escape "/" for security reasons (inclusion in HTML, specifically). And any JSON tool that does not handle escapes properly is broken, so while I think this can lead to problems (like existing tests not counting on escaping and using textual comparison for JSON output), I don't think it should lead to processing issues (and/or if it does that is exposing bugs in tooling). Having said that, if community feels changing defaults is not desired, I am fine with that too. But just need to get some sort of validation, in form of Poll. :) |
(on Builder problem -- yes, "generic" |
(follow-up to #507)
Now that we have added ability to easily force escaping of
/
let's make that default for Jackson 3.0 stream writers.The text was updated successfully, but these errors were encountered: