This works, because "foo" is a valid JSON value:
$ jq --null-input '$ARGS' --jsonargs '"foo"'
{
"positional": [
"foo"
],
"named": {}
}
But if the passed-in value is not a valid JSON value, jq crashes violently:
$ jq --null-input '$ARGS' --jsonargs foo
{
"positional": [
jq: src/jv_print.c:223: jv_dump_term: Assertion `0 && "Invalid value"' failed.
Aborted (core dumped)
jq should fail more gracefully with a proper error message when an
invalid jsonargs is passed.