Open dantownsend opened 1 month ago
We just added more powerful JSON filtering, but when integrating it into Piccolo Admin, I realised there's a bug here:
https://github.com/piccolo-orm/piccolo/blob/448a818e3e7420e6f052b6e79473bbeee0b3e76f/piccolo/query/operators/json.py#L15-L16
We should also encode strings as JSON e.g. 'hello world' -> '"hello world"'. However, if the string is already valid JSON, we should leave it alone (e.g. '{"message": "hello world"}').
'hello world'
'"hello world"'
'{"message": "hello world"}'
We just added more powerful JSON filtering, but when integrating it into Piccolo Admin, I realised there's a bug here:
https://github.com/piccolo-orm/piccolo/blob/448a818e3e7420e6f052b6e79473bbeee0b3e76f/piccolo/query/operators/json.py#L15-L16
We should also encode strings as JSON e.g.
'hello world'
->'"hello world"'
. However, if the string is already valid JSON, we should leave it alone (e.g.'{"message": "hello world"}'
).