echo "not json" | jq -R '. as $line | try (fromjson) catch $line
# > "not json"