Skip to content

Commit

Permalink
feat: Add round_trip=True as a default json serialization.
Browse files Browse the repository at this point in the history
  • Loading branch information
pesap committed Jan 22, 2025
1 parent 91584d2 commit a9d9dce
Showing 1 changed file with 1 addition and 1 deletion.
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 a9d9dce

Please sign in to comment.