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

Add JsonGenerator.Feature to use single quotation marks instead of double quotes #235

Closed
wants to merge 1 commit into from

Conversation

dgolub
Copy link

@dgolub dgolub commented Dec 11, 2015

No description provided.

@cowtowncoder
Copy link
Member

Thank you for the contribution. This could be considered for 2.8. I think I'd change configuration slightly to have local char/byte to contain quote character to use, otherwise probably could be merged as-is.
I hope to look into merging this in near/medium future; right now there's big backlog of 2.7 fixes.

@cowtowncoder cowtowncoder changed the title Add JsonGenerator feature to use single quotation marks (2.8) Add JsonGenerator.Feature to use single quotation marks instead of double quotes Feb 23, 2016
@cowtowncoder
Copy link
Member

Made a small refactoring so that both generators now use a field _quoteChar to contain character/byte used as quote character. This should simplify implementation a bit.

@cowtowncoder cowtowncoder changed the title (2.8) Add JsonGenerator.Feature to use single quotation marks instead of double quotes (2.9?) Add JsonGenerator.Feature to use single quotation marks instead of double quotes Jun 7, 2016
@cowtowncoder cowtowncoder changed the title (2.9?) Add JsonGenerator.Feature to use single quotation marks instead of double quotes Add JsonGenerator.Feature to use single quotation marks instead of double quotes Mar 9, 2017
@fak98
Copy link

fak98 commented Mar 24, 2017

I need this feature. Is there an ETA for it yet?

@cowtowncoder
Copy link
Member

No. Not sure it'll be worked anytime soon.

@grexe
Copy link

grexe commented Feb 12, 2018

well 1 year later and I stumble over the same need, can this PR please be integrated for 2.9 at least? Escaped XML in JSON responses looks a bit ugly...

@cowtowncoder cowtowncoder added 3.x Issues to be only tackled for Jackson 3.x, not 2.x and removed 2.9 labels May 2, 2018
@cowtowncoder
Copy link
Member

Created/transferred matching issue, #617

@cowtowncoder
Copy link
Member

If anyone wants to pick this up, PR is pretty good -- the one suggestion I would make is that instead of creating a new method for writing out quote (_writeQuote()), I would actually add a field to contain quote character and use that in places.
I will add into CREDITS both original submitter here and whoever works on updated patch if need be.

@cowtowncoder
Copy link
Member

cowtowncoder commented Oct 21, 2020

As pointed out by @angelyan, this was implemented as #549 for more general applicability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.x Issues to be only tackled for Jackson 3.x, not 2.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants