#878091 jq: accepts invalid JSON

Package:
jq
Source:
jq
Description:
lightweight and flexible command-line JSON processor
Submitter:
Thorsten Glaser
Date:
2022-07-07 12:51:05 UTC
Severity:
important
Tags:
#878091#5
Date:
2017-10-09 18:33:13 UTC
From:
To:
jq silently accepts illegal JSON:

tglase@tglase:~ $ jq <<<'[0,01,2]'
[
  0,
  1,
  2
]
tglase@tglase:~ $ jsn <<<'[0,01,2]'
JSON decoding of input failed: {
  "input": "[0,01,2]\n",
  "message": "missing comma in Array at offset 0x4"
}

A Number may not have a leading zero. Secondary reference:
http://www.json.org/JSON_checker/test.zip

#878091#10
Date:
2019-10-09 16:24:37 UTC
From:
To: