Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to keep default values in serialized JSON #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

RojerUA
Copy link

@RojerUA RojerUA commented Mar 17, 2020

We use Protobuf to define API endpoints and spotted surprising behavior - items with default values are absent in the serialized JSON. It is uncommon for PHP REST APIs to have parameters disappearing from response when returned value is default one. This PR solves this problem without braking default behavior.

I would like to hear your feedback on proposed solution. Thanks.

@TeBoring
Copy link
Contributor

TeBoring commented Mar 17, 2020 via email

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.

2 participants