jrjackson
jrjackson copied to clipboard
(Ruby) Add option to parse with ALLOW_UNESCAPED_CONTROL_CHARS
It would be great if JrJackson::Ruby
allowed one to specify some option which would cause parsing with ALLOW_UNESCAPED_CONTROL_CHARS
. So, in particular, it would be possible to parse json like
{
"message": "This contains
newlines, what maybe isn't 100% formal,
but is eye friendly"
}
If I understand correctly (my java is … fairly limited) this is about paching somewhere around https://github.com/guyboertje/jrjackson/blob/master/src/main/java/com/jrjackson/JrJacksonRuby.java#L75 so it (conditionally) enables this feature using approach described in https://github.com/FasterXML/jackson-core/issues/586
Rationale: I got here while digging whether logstash could parse json's with unescaped newlines ( https://github.com/logstash-plugins/logstash-filter-json/issues/53 )