Skip to content

Commit 6d718a1

Browse files
models: Simplify signature configuration serialization
- Replaced manual JSON construction with the built-in `model_dump_json` method, streamlining and optimizing the serialization process. Assisted-by: Codex
1 parent 36bfb16 commit 6d718a1

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/pdfrest/models/_internal.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,7 @@ def _serialize_text_objects(value: list[BaseModel]) -> str:
173173
def _serialize_signature_configuration(
174174
value: _PdfSignatureConfigurationModel,
175175
) -> str:
176-
payload = value.model_dump(mode="json", exclude_none=True)
177-
return to_json(payload).decode()
176+
return value.model_dump_json(exclude_none=True)
178177

179178

180179
def _allowed_mime_types(

0 commit comments

Comments
 (0)