Skip to content

Fix ActiveModel JSON deserialization for missing fields - #3217

Open
Huliiiiii wants to merge 1 commit into
SeaQL:masterfrom
Huliiiiii:from-json
Open

Huliiiiii wants to merge 1 commit into
SeaQL:masterfrom
Huliiiiii:from-json

Conversation

@Huliiiiii

@Huliiiiii Huliiiiii commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

PR Info

The only issue with this implementation is that, once the with-json feature is enabled, it will always generate such a struct.

flatten isn't supported because our current implementation effectively turns each field into an Option, but we can't do the same for a flattened field.

Release Notes

  • Fix ActiveModel JSON deserialization for missing fields
    This also respects more attributes, such as default and skip.

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.

ActiveModel::from_json fails to deserialize TimeDateTimeWithTimezone fields to NotSet when field is missing from JSON payload

1 participant