On 13-02-22 03:08 PM, Lex Trotman wrote:
But, where can I find the content of this check_json script file?
Its on the wiki as:
#!/bin/bash if which python >/dev/null ; then python -m json.tool <$1 2>&1 >/dev/null \ | sed 's/^([^:]*): line (.*)/'$1':\2: \1/' elif which perl >/dev/null ; then perl -MJSON -e 'local $/;decode_json(<STDIN>);' <$1 2>&1 >/dev/null \ |sed 's/^(.*) at .e line 1, .STDIN. [^ ]* ([0-9]*)/'$1':\2: \1/;' else echo "No known JSON parsers found" >&2 exit 1 fi
Doh!
I took "For people using Unix, the following will be helpful for checking your JSON files for correctness." too literally and did not think it applied to Linux ..causing a lot of bother as a result.
Now any .json file is recognized as such and there is a hint of context sensitive highlighting: bolded variable names and green numbers. My next job will be to try to expand and embellish the context sensitive highlighting.
But, one problem I have run into is the opening/closing brace/bracket check is disabled for filetype: JSON. I can enable it by Document -> Set filetype -> NONE ..precisely where I started a couple of days ago :o(
Thanks again for your patience,
RF