replaced deprecated json function with model_dump_json

Signed-off-by: Peter Staar <taa@zurich.ibm.com>
This commit is contained in:
Peter Staar 2024-08-26 20:32:23 +02:00
parent 24c0b9d4c9
commit 08364dfa56

View File

@ -101,7 +101,7 @@ def test_conversions():
if GENERATE:
with open(json_path, "w") as fw:
fw.write(doc_pred_json.json())
fw.write(doc_pred_json.model_dump_json()())
with open(md_path, "w") as fw:
fw.write(doc_pred_md)
@ -114,7 +114,7 @@ def test_conversions():
with open(md_path, "r") as fr:
doc_true_md = "".join(fr.readlines())
doc_ = json.loads(doc_pred_json.json())
doc_ = json.loads(doc_pred_json.model_dump_json())
# print(json.dumps(doc_, indent=2))
assert verify_json(