This is an automated email from the ASF dual-hosted git repository. humbedooh pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/steve.git
commit e2b7b1aa93b2fa1aa474019031d6763cc5abcaf9 Author: Daniel Gruno <[email protected]> AuthorDate: Sun Jan 26 12:34:29 2025 +0100 always pickle strings with the JSON marker, since those are fakes --- pysteve/lib/backends/sqlite.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pysteve/lib/backends/sqlite.py b/pysteve/lib/backends/sqlite.py index e62c798..f0ef382 100644 --- a/pysteve/lib/backends/sqlite.py +++ b/pysteve/lib/backends/sqlite.py @@ -87,7 +87,7 @@ class SteveSQLite(object): def pickle(doc: dict): ndoc = {} for k, v in doc.items(): - if isinstance(v, list) or isinstance(v, dict): + if isinstance(v, list) or isinstance(v, dict) or (isinstance(v, str) and v.startswith("%JSON%:")): v = "%JSON%:" + json.dumps(v) ndoc[k] = v return ndoc
