mirror of
https://github.com/DS4SD/docling.git
synced 2025-07-26 20:14:47 +00:00
replaced deprecated json function with model_dump_json
Signed-off-by: Peter Staar <taa@zurich.ibm.com>
This commit is contained in:
parent
24c0b9d4c9
commit
08364dfa56
@ -101,7 +101,7 @@ def test_conversions():
|
|||||||
if GENERATE:
|
if GENERATE:
|
||||||
|
|
||||||
with open(json_path, "w") as fw:
|
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:
|
with open(md_path, "w") as fw:
|
||||||
fw.write(doc_pred_md)
|
fw.write(doc_pred_md)
|
||||||
@ -114,7 +114,7 @@ def test_conversions():
|
|||||||
with open(md_path, "r") as fr:
|
with open(md_path, "r") as fr:
|
||||||
doc_true_md = "".join(fr.readlines())
|
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))
|
# print(json.dumps(doc_, indent=2))
|
||||||
|
|
||||||
assert verify_json(
|
assert verify_json(
|
||||||
|
Loading…
Reference in New Issue
Block a user