Skip to content

Commit

Permalink
feat: Add round_trip=True as a default json serialization. (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
pesap authored Jan 23, 2025
1 parent 91584d2 commit df0bd49
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "infrasys"
version = "0.2.3"
version = "0.2.4"
description = ''
readme = "README.md"
requires-python = ">=3.10, <3.13"
Expand Down
2 changes: 1 addition & 1 deletion src/infrasys/serialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def get_type(self, metadata: SerializedTypeBase) -> Type:
def serialize_value(obj: InfraSysBaseModel, *args, **kwargs) -> dict[str, Any]:
"""Serialize an infrasys object to a dictionary."""
cls = type(obj)
data = obj.model_dump(*args, mode="json", **kwargs)
data = obj.model_dump(*args, mode="json", round_trip=True, **kwargs)
data[TYPE_METADATA] = SerializedTypeMetadata(
fields=SerializedBaseType(
module=cls.__module__,
Expand Down

0 comments on commit df0bd49

Please sign in to comment.