Skip to content

Serialize a defined false value like 0 instead of dropping it - #1860

Open
SAY-5 wants to merge 1 commit into
PerlDancer:mainfrom
SAY-5:serialize-false-content
Open

SAY-5 wants to merge 1 commit into
PerlDancer:mainfrom
SAY-5:serialize-false-content

Conversation

@SAY-5

@SAY-5 SAY-5 commented Oct 18, 2026

Copy link
Copy Markdown

Fixes #1798

Both guards around serialization treated a false value as "nothing to serialize", so a route returning 0 under a serializer came back as an empty 200 even with allow_nonref set. They now test for a defined, non-empty value, which lets 0 through while an empty string is still left alone, as suggested in the issue.

Signed-off-by: Sai Asish Y <say.apm35@gmail.com>
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.

Serialization failure is reported as 200 with an empty body; falsy values (0, "") can never be serialized

1 participant