We just added more powerful JSON filtering, but when integrating it into Piccolo Admin, I realised there's a bug here:
|
if not isinstance(value, (str, QueryString)): |
|
value = dump_json(value) |
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"}').
We just added more powerful JSON filtering, but when integrating it into Piccolo Admin, I realised there's a bug here:
piccolo/piccolo/query/operators/json.py
Lines 15 to 16 in 448a818
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"}').