Need enable jackson's JsonParser.Feature.ALLOW_UNQUOTED_CONTROL_CHARS

572 views
Skip to first unread message

宾莉金

unread,
Aug 4, 2015, 4:16:35 AM8/4/15
to Druid User
We have some services product complex json data,and realtime task throw many JsoParseException:

Caused by: com.fasterxml.jackson.core.JsonParseException: Illegal unquoted character ((CTRL-CHAR, code 4)): has to be escaped using backslash to be included in string value at [Source: 
and i find we just need to set ALLOW_UNQUOTED_CONTROL_CHARS to true in jackson. 

src/main/java/io/druid/data/input/impl/JSONParseSpec.java

+        objectMapper.configure(Feature.ALLOW_UNQUOTED_CONTROL_CHARS, true);

So, what about add this feature in druid?

Fangjin Yang

unread,
Aug 4, 2015, 12:14:32 PM8/4/15
to Druid User
I'm on board with this feature. Can you submit a PR for it?

Gian Merlino

unread,
Aug 9, 2015, 2:44:05 PM8/9/15
to Druid User
I think an option for this behavior is ok, but I'm wondering what prevents you from quoting control characters in your JSON? Unquoted control characters are technically not allowed by the JSON spec.

--
You received this message because you are subscribed to the Google Groups "Druid User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to druid-user+...@googlegroups.com.
To post to this group, send email to druid...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/druid-user/24667c3b-df29-48e6-a30b-576c229c6df9%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages