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

Ignore optional undefined Json fields #2149

Merged
merged 1 commit into from May 9, 2018
Merged

Ignore optional undefined Json fields #2149

merged 1 commit into from May 9, 2018

Conversation

@gedaiu
Copy link
Contributor

@gedaiu gedaiu commented May 1, 2018

No description provided.

@s-ludwig
Copy link
Member

@s-ludwig 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.

@gedaiu gedaiu force-pushed the gedaiu:patch-1 branch from 3f7e09f to d239962 May 8, 2018
@gedaiu gedaiu force-pushed the gedaiu:patch-1 branch from d239962 to b009193 May 8, 2018
@s-ludwig
Copy link
Member

@s-ludwig 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
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
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants