Skip to content

Write empty Nullable types as null #132

Closed
@mrow84

Description

@mrow84

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions