-
-
Notifications
You must be signed in to change notification settings - Fork 798
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
How to use JsonReadFeature.ALLOW_UNESCAPED_CONTROL_CHARS #586
Comments
Usage can be done in 3 ways:
In first 2 of these, approach requires something like:
Third approach might be easiest as you can use existing
|
it is very helpful. thanks |
Actually, I tried this |
@amreladawy I can not reproduce this: works for me with Jackson 2.10.4, using either one of below:
but if you can reproduce it with at test, specific Jackson version, please file an issue for |
@cowtowncoder Thanks for coming back to me on this closed issue. Here is the code
This is kotlin, but should not make any difference. I am using jakson 2.11.0 Here is the signature of the enable method.
There is not signature that accepts By the way, the above code worked and was able to activate the feature. |
@amreladawy seems like you were trying to find Deprecated variant does still work with 2.x for backwards-compatibility reasons and will not be removed until 3.0. So that is fine. It is deprecated as 3.0 will remove direct mutability of |
Thanks for your help on that. |
I think everyone figured it out already but just adding something which bugged me for a while before finally getting the solution. I didn't want to create to custom Mapper but continue using my application.properties file. If you are using spring-boot version 1.5.18 and using the application.properties file, then you can simply add one line in your application.properties file: No need to create custom Mapper or anything. This resolved my issue. |
@amittal1 thank you for sharing this! |
Why you asume everyone is using spring? |
I was having problems with using this via
I'm not sure why, but I worked around with |
@amittal1 Thank you for sharing. :D |
I'm not sure why it works when parsing the name-selector.json` in jsonpath-standard/jsonpath-compliance-test-suite#94 |
The enum JsonParser.Feature.ALLOW_UNQUOTED_CONTROL_CHARS is Deprecated in version jackson-core 2.10.0. I see to use JsonReadFeature.ALLOW_UNESCAPED_CONTROL_CHARS. but i can't find api to use this. can who show a case use ObjectMapper? thanks
The text was updated successfully, but these errors were encountered: