-
-
Notifications
You must be signed in to change notification settings - Fork 796
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
Allow serialization with Single Quotes \' in stead of Standard Double Quotes \" #617
Comments
There is a PR already for this (see #235) but I think I can move this as an RFE for jackson-core to match. |
@cowtowncoder thanks ! |
Any chance to get this merged into the base line? |
I am hoping to get this merged to be included in 2.12.0, but unfortunately there is lots of work and this is not one of priority items. |
@cowtowncoder np, thank you for your work |
Thank you! Let's hope it makes it in -- it is included on my long todo list: https://github.com/FasterXML/jackson-future-ideas/wiki/Jackson-Work-in-Progress |
@cowtowncoder I am new here and would like to pick this one. |
@cowtowncoder is this not possible already in 2.12 with |
@cowtowncoder I think there's something missing, though. Shouldn't singles quotes be escaped and double quotes be left as is here? jackson-core/src/test/java/com/fasterxml/jackson/core/json/CustomQuoteCharTest.java Line 78 in 2e11f0c
|
I am sure there are different preferences; some might prefer minimal escaping, others keeping both. If there is some follow-up improvements needed, filing a new issue is always possible. |
Adding something like this feature
JsonWriteFeature.USE_SINGLE_QUOTE
. Permitting to serialize:{"name": "value"}
to{'name': 'value'}
and if alsoJsonWriteFeature.QUOTE_FIELD_NAMES
is disabled to{name: 'value'}
.I know this is not standard JSON, but might be really helpful to get TypeScript-formatted JSON.
The text was updated successfully, but these errors were encountered: