FasterXML / FasterXML/jackson-dataformats-binary

[Avro] JsonInclude.Include.NON_NULL does not use default values

Aperta
#165 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
avro
Lingua principale
Java
Stelle
347
Fork
156
Merge medio
3g 3h
PR unite (30g)
22

Descrizione

In the following example, I'd expect that the default value defined for the property `map` would be used. Instead, `null` is passed, which produces an error as null is not allowed for this field.

Schema
```json
{"type": "map", "values": "string", "default": []}
```

POJO
```java
class Foo {
@JsonProperty("map")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
Map getMap();
}
```

Error
```
com.fasterxml.jackson.databind.JsonMappingException: null of map in field map of Foo
```

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.