Skip to content
New issue

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

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

Already on GitHub? # to your account

Null being deserialized as null literal instead of JsonValue.NULL #16

Closed
marcospassos opened this issue Mar 3, 2020 · 3 comments · Fixed by #17
Closed

Null being deserialized as null literal instead of JsonValue.NULL #16

marcospassos opened this issue Mar 3, 2020 · 3 comments · Fixed by #17
Milestone

Comments

@marcospassos
Copy link
Contributor

The deserializer is deserializing null literally instead of JsonValue.NULL.

@marcospassos marcospassos changed the title Null being deserialized as null instead of JsonValue.NULL Null being deserialized as null literal instead of JsonValue.NULL Mar 3, 2020
@cowtowncoder
Copy link
Member

cowtowncoder commented Mar 3, 2020

Any chance for a small reproduction? :)

Deserializer seems to handle nulls as expected:

        JsonObjectBuilder b = _builderFactory.createObjectBuilder();
        ....
            case VALUE_NULL:
                b.addNull(name);
                break;

// and in another place
        switch (p.getCurrentToken()) {
        ...
        case VALUE_NULL:
            return JsonValue.NULL;

so it is not immediately clear where null would be produced; and/or whether that could depend on JSR-353 implementation itself.

@marcospassos
Copy link
Contributor Author

@cowtowncoder Thanks your quick reply. I've just submitted a PR that includes the test and fix for the issue.

@cowtowncoder
Copy link
Member

Alas, need to revert due to #18, for 2.10.5.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants