Skip to content
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

SOLR-16925 Broken JSON indentation using JacksonJsonWriter #1941

Closed
wants to merge 1 commit into from

Conversation

noblepaul
Copy link
Contributor

No description provided.

Copy link
Contributor

@HoustonPutman HoustonPutman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not really sure how this fixing the issue (I also tested and the issue is still there). We are already using a pretty printer, but the issue is that the pretty printer is stateful.

So basically we need to create a new instance of PrettyPrinter for every json serialization, which we can do by using the gen.setPrettyPrinter(pretty.createInstance()) method if pretty is a DefaultPrettyPrinter object.

@HoustonPutman
Copy link
Contributor

I created a new PR for this #1942

@noblepaul
Copy link
Contributor Author

I also tested and the issue is still there

I'm sure it did fix the issue. Your solution works just fine. I'll close this and approve that

@noblepaul
Copy link
Contributor Author

closing this in favor of #1942

@noblepaul noblepaul closed this Sep 21, 2023
@noblepaul noblepaul deleted the jira/solr16925 branch October 2, 2023 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants