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

Write empty Nullable types as null #132

Closed
mrow84 opened this issue Jan 1, 2016 · 1 comment · Fixed by #174
Closed

Write empty Nullable types as null #132

mrow84 opened this issue Jan 1, 2016 · 1 comment · Fixed by #174

Comments

@mrow84
Copy link

mrow84 commented Jan 1, 2016

Apologies if I've misunderstood something, but it seems like Nullable values don't get written as JSON null if they are empty. Sorry for not setting up a pull request, but I think adding something like this should fix it:

function _print{T}(io::IO, state::State, n::Nullable{T})
    if isnull(n)
        Base.print(io, "null")
    else
       _print(io, state, get(n))
    end
end
@TotalVerb
Copy link
Collaborator

This should hopefully be easy to add, without adding more _print overloads, once #151 is finished.

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 a pull request may close this issue.

2 participants