jq
prints error message like the following when the input is invalid.
$ jq . <<< "xxx"parse error: Invalid numeric literal at line 2, column 0
I want to control what is printed when the input json is not valid. For example, I may want to prepend something to the original error message. How can I achieve this with jq?
XXX:parse error: Invalid numeric literal at line 2, column 0