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

Ignore optional undefined Json fields #2149

Merged
merged 1 commit into from May 9, 2018

Conversation

Projects
None yet
2 participants
@gedaiu
Contributor

gedaiu commented May 1, 2018

No description provided.

@s-ludwig

This comment has been minimized.

Member

s-ludwig commented May 8, 2018

I was thinking about this and think that fixing this in readDictionary would solve a few additional cases that currently won't work as expected. So instead of handling undefined in tryReadNull, readDictionary would simply skip any undefined fields.

Similarly, readArray could also be patched to replace any undefined with null when setting m_current, to match the JavaScript JSON conversion semantics.

@s-ludwig

This comment has been minimized.

Member

s-ludwig commented May 9, 2018

Thanks!

@s-ludwig s-ludwig merged commit 153e7be into vibe-d:master May 9, 2018

2 of 3 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
codecov/patch 100% of diff hit (target 58.963%)
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment