Invalid JSON produced under certain options
In several cases, but for example with -j (json output) -E (EDNS only) the output is an invalid JSON document. The problem lies in the array of tests and the splitting of its values. Looking at the text output its error is tests:
{ , dns:ok edns:ok ....
So because its limited tests it leaves a first , in the tests output. Removing this single character fixes the broken JSON. please restructure the building of the JSON output and validate the JSON when outputting to prevent these errors