Closed junderwood closed 10 years ago
that may not be easily fixable (if at all), since the error comes from the depths of boost
sorry, my bad... the above should read: cat config.json | name-value-get something --from json and that gives the error:
name-value-get:
...I only just noticed this does have the line number !! What on earth is the hex value...
I revise my enhancement request to say - could this be a neater error, like:
name-value-get stdin(16): expected...
done:
echo -e "{\n \"a\" : \"1\" \n \"b\" : \"2\" \n}" { "a" : "1" "b" : "2" }
echo -e "{\n \"a\" : \"1\" \n \"b\" : \"2\" \n}" | name-value-convert --from json --to path-value name-value-convert: parsing error: line(3): expected ',' or '}'
E.g.: cat config.json | name-value-get something returns: name-value-get:(1): unexpected {
0x7fa13dc12688
if there is a missing trailing comma anywhere in the file. Same for name-value-convert. It can be tiresome to track down the offending comma. It happens a lot, because apparently you must have commas for all but the last entry of a block, and most not have a comma for that last entry.
Would be a big time saver if the output read: error in file on line 32