SQLite Forum

Unexpected behaviour of the json_valid function and .json mode in CLI
Thanks, that explains that issue.
I checked the code in shell.c and the 'translation' to JSON is indeed based on the declared affinity.
So for what I want I can't use .mode json but will have to write my own query.