Check if string is a valid JSON with jq
问题 I need to catch an error when lifting a service. The response can be null , a string error message like error services-migration/foobar: Not found: services-migration/foobar or a valid JSON when everything is fine. I was wondering if there is a way with jq to simply check if the provided string is a valid JSON. I could ofc check the string for some keywords like error f.e., but I'm looking for a more robust option, where eg. I get a true/false or 1/0 from jq. I was looking through the docs of