Quantcast
Channel: Active questions tagged jq - Stack Overflow
Viewing all articles
Browse latest Browse all 657

Parse error when text is split on multi lines: "control characters from U+0000 through U+001F must be escaped"

$
0
0

I'm getting a "parse error" when I split a text line on multiple lines and show the JSON file on screen with the command jq . words.json.

The JSON file with the text value on a single line looks like this

{"words" : "one two three four five"}

The command jq . words.json works fine and shows the JSON file on screen.

But when I split the value "one two three four five" on two lines and run the same command I get a parse error

{"words" : "one two       three four five"                   ^}  

parse error: Invalid string: control characters from U+0000 throughU+001F must be escaped at line 3, column 20

The parse error points to the " character at the end of the third line.

How can I solve this?


Viewing all articles
Browse latest Browse all 657

Trending Articles