Skip to content

Conversation

@razor-x
Copy link
Member

@razor-x razor-x commented Oct 28, 2025

BREAKING CHANGE: Serialization of the empty string is now treated as undefined instead of an UnserializableParamError.

Otherwise, the serialization of { foo: null } would conflict with { foo: '' }.
This serializer chooses to support the more common and more useful case of sending null
as a meaningful value while treating the empty string as sending no value.
This aligns with common UX patterns where input fields are initialized to the empty string.

Closes #20.

BREAKING CHANGE: Serialization of the empty string is now treated as `undefined` instead of an UnserializableParamError.

Otherwise, the serialization of `{ foo: null }` would conflict with `{ foo: '' }`.
This serializer chooses to support the more common and more useful case of sending `null`
as a meaningful value while treating the empty string as sending no value.
This aligns with common UX patterns where input fields are initialized to the empty string.

Closes #20.
@razor-x razor-x merged commit 8a89294 into main Nov 6, 2025
11 checks passed
@razor-x razor-x deleted the evan/cx-462-consider-permissive-serialization-for-empty-string-to branch November 6, 2025 17:36
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.

Consider permissive serialization for empty string to undefined

2 participants