When we get Invalid numeric literal error when on colon following a single-quoted string
echo "{'foo':'bar'}" | jq
jq: parse error: Invalid numeric literal at line 1, column 7
jq has text manipulation support and a fromjson function so we can do something like:
$ echo "{'foo':'bar'}" | jq -R "gsub(\"'\"; \"\\\"\") | fromjson"
{
"foo": "bar"
}