Skip to content

Commit

Permalink
fix: serialization mode
Browse files Browse the repository at this point in the history
Signed-off-by: Frost Ming <[email protected]>
  • Loading branch information
frostming committed Nov 28, 2024
1 parent 25b3930 commit ef655e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/_bentoml_sdk/io_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ def model_dump(self, **kwargs: t.Any) -> dict[str, t.Any]:
return super().model_dump(**kwargs)["root"]

def model_dump_json(self, **kwargs: t.Any) -> str:
return json.dumps(self.model_dump(**kwargs))
return json.dumps(self.model_dump(mode="json", **kwargs))

@classmethod
def model_validate(cls, obj: t.Any, **kwargs: t.Any) -> t.Self:
Expand Down

0 comments on commit ef655e8

Please sign in to comment.