FasterXML / jackson-datatype-jsr353

(DEPRECATED) -- moved under `jackson-datatypes-misc` https://github.com/FasterXML/jackson-datatypes-misc/
19 stars 14 forks source link

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

Closed marcospassos closed 4 years ago

marcospassos commented 4 years ago

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

cowtowncoder commented 4 years ago

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 commented 4 years ago

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

cowtowncoder commented 4 years ago

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