-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Add a config flag to disable whitespace trimming #832
Add a config flag to disable whitespace trimming #832
Conversation
@keatontaylor10 Thanks for the PR and the careful work. Code review is in progress, but have patience due to the holiday. |
@keatontaylor10 Out of sync, please merge master to your branch. |
@stleary I have merged and pushed to my branch |
…t the use of shouldTrimWhiteSpace
Hi, is anything else required to get this merged? |
@keatontaylor10 Please respond to this question: |
For our use case this would not work unfortunately as we don't know what all the tags will be at this point and we need to disable whitespace trimming on all the tags. Would this feature be required to be set per tag? |
@keatontaylor10 I just resolved all but a couple of the comments. I think there are several comments you have not responded to yet regarding CDATA and empty arrays. If you are not sure of a response, no worries, I will add some tests to understand the behavior. Please do one more merge, it looks like the PR has gone out of sync again. Thanks for being patient, progress is being made. |
I have synced my branch. I also left a couple more comments to hopefully answer your questions in a bit more detail. |
@keatontaylor10 My testing did not raise any red flags. However, there is an edge case that's worth noting. Are you sure you want this behavior? If you are OK with it, I can go ahead and approve the PR. Here is a slightly different variation that illustrates CDATA handling can give similar unexpected results even for the legacy code. I guess I would consider this a newly discovered bug in the existing code. |
@stleary Thanks for testing. This behaviour is fine for my use case as our inputs won't have CDATA tags so we won't run into this problem. |
What problem does this code solve? Does the code still compile with Java6? Risks Changes to the API? Will this require a new release? Should the documentation be updated? Does it break the unit tests? Was any code refactored in this commit? Review status Starting 3-day comment window |
Thank you for reviewing and getting this merged. |
@keatontaylor10 it's a little early for the next release, but I will try for this weekend. |
Related issue: #695 (comment)
Notes about implementation:
shouldTrimWhitespace
has been added and can be passed into the toJSONObject method to disable whitespace trimming. This is as discussed in the issue.