jsawk icon indicating copy to clipboard operation
jsawk copied to clipboard

Escaped characters

Open mortocks opened this issue 9 years ago • 0 comments

Can't seem to deal with json with escaped characters.

[{
"id": 413,
"description": "This \"String\" can't be processed even though its valid json."
}]

Have tried

curl $URL | jsawk  -n 'out(this["description"])'
// json parse error


curl $URL > json.json
cat json.json |  jsawk  -n 'out(this["description"])'
// json parse error. looking at json.json the " characters seem to be escaped. 

Not sure if I'm missing a special flag but can't see any information in the documentation or examples of how to use the -i flag to load escaped json from file.

mortocks avatar Feb 26 '16 03:02 mortocks