Skip to content

Allow serialization/unserialization of objects on mixed properties#87

Merged
Crell merged 4 commits intomasterfrom
mixed-serialize
Jun 19, 2025
Merged

Allow serialization/unserialization of objects on mixed properties#87
Crell merged 4 commits intomasterfrom
mixed-serialize

Conversation

@Crell
Copy link
Copy Markdown
Owner

@Crell Crell commented Jun 19, 2025

Description

Previously, mixed properties didn't support objects. They would fail with a circular dependency due to how mixed properties are handled. That's sub-optimal, especially when union types are not supported.

This PR resolves the circular dependency, albeit in a slightly not-nice way. Additionally, it provides support for deserializing into an object on a mixed property, but at the expense of allowing arrays when deserializing. Frankly that's an edge case, and if you have a mixed property it should be serialized only, but some APIs are dumb, so we provide some support for it.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

This fix was sponsored by my employer, MakersHub.

@Crell Crell merged commit e3eebb3 into master Jun 19, 2025
8 checks passed
@Crell Crell deleted the mixed-serialize branch June 19, 2025 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant