2.1.x: JsonNodeDeserializer returns Java null instead of a NullNode on deserialization: on purpose?
See original GitHub issueLink:
I needed it because for my JSON Patch implementation, it is perfectly legal to replace/add/test for a JSON null value.
But JsonNodeDeserializer
returns null
by default instead of a NullNode
. Not sure whether this was meant, or whether changing it would break existing code etc.
Patches for master and 2.1 provided it was not meant to be this way:
UPDATE: master not affected, therefore 2.2.x not affected. Bisected.
Issue Analytics
- State:
- Created 11 years ago
- Comments:12 (11 by maintainers)
Top Results From Across the Web
How to deserialize JSON null to a NullNode instead of Java ...
public final class JsonNullAwareDeserializer extends JsonNodeDeserializer { @Override public JsonNode getNullValue() { return NullNode.
Read more >Ignore Null Fields with Jackson - Baeldung
This quick tutorial is going to cover how to set up Jackson to ignore null fields when serializing a java class.
Read more >How to deserialize a JSON array to a singly linked list by using ...
I want to deserialize a JSON array to a singly linked list in Java. The definition of singly linked list is as the...
Read more >Uses of Interface com.fasterxml.jackson.databind.deser ...
Bogus deserializer that will simply skip all content there is to map and returns Java null reference. static class, NumberDeserializers.BigDecimalDeserializer.
Read more >Serialization and Deserialization in Java with Example
Serializable interface. The ObjectOutputStream class contains writeObject() method for serializing an Object. public final void writeObject( ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @cowtowncoder after upgrading jackson from 2.2.2 to 2.7.7 for my project i’m facing issue due to change in deserialization of null into “null” string. Earlier it was deserializing it to null String object. Is there some configuration to achieve it.
My tests read instance of
JsonNode
, not a property with that type. I take that was the difference. Merged fix back in 2.1 as well; hoping to deprecate 2.1 as soon as 2.2.0 is out.