SQLite Forum

Unexpected behaviour of the json_valid function and .json mode in CLI
Thanks, that explains it.
Basically it is an Expectation Management Issue: based on the example in the documentation I expected json_valid to test the validaty of a JSON OBJECT, however in reality it only tests for well-formed JSON.
Having my expectations now correctly managed I now know how to fix the query.