Allow backquoted string (based on ES6 template string)
Suggesting adding an option to the JSON PARSER to allow backquoted string, based on ES6 template string.
The main benefit will be simplified way to enter multi line strings. It will allow (for most cases) to copy paste data from external documents, without having to edit the constant by adding ‘\’ before every new line, etc. likewise editing of such strings is significantly easier for users, and code.
example:
{ foo: \`with backquoted string
Easy to see line breakdown,
Enter escapes \n and \t
And use quote ‘ and “
` }
abive string using standard json in difficult to maintain.
to emphasize, I do not suggest in this ticket that support will be included for placeholders ($(expression), tagged strings, sinterpolation. This can be a follow ( and very useful) extensions.
to support the argument, I want to highlight Jackson already support most of EC6 grammar; extra comma, unquoted identifiers and more.
Ok, if anyone has time & itch, such feature could be enabled with JsonReadFeature setting (disabled by default).
Amount of work would probably be sizable, to support with all 4 backends (InputStream, Reader, DataInput & async readers).
This seems pretty similar to #612 - which already works if you set the right features on the mapper. Backticks are not supported though.
Right, these seem similar/related. Neither implemented yet.