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 configurability of "quote character" for JSON factory #549

Closed
cowtowncoder opened this issue Aug 1, 2019 · 1 comment
Closed

Add configurability of "quote character" for JSON factory #549

cowtowncoder opened this issue Aug 1, 2019 · 1 comment
Milestone

Comments

@cowtowncoder
Copy link
Member

Although both byte- and char-backed generators have internal setting for quote character to use (defaulting to double-quotes), there is currently no way to change it to anything else (such as single-quote (apostrophe)). But with 2.10 it should be possible and easy to allow configuring it.

cowtowncoder added a commit that referenced this issue Aug 12, 2019
@cowtowncoder cowtowncoder added this to the 2.10.0.pr2 milestone Aug 13, 2019
@cowtowncoder
Copy link
Member Author

cowtowncoder commented Aug 13, 2019

Initial version working but need to work on escaping aspects. Chances are that supporting proper escaping for String values turns out to be easy, but not so for Keys (since code is heavily optimized, uses pre-construction).

Also: currently limited to ASCII range for UTF-8 backed output: need to add some sort of validation, and probably just not allow for either backend since escaping of arbitrary character gets complicated even with char-backed (considering existing implementation).
But this should be ok as the main use case really is to support apostrophes as alternative, not so much "any character".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant