FasterXML / FasterXML/jackson-dataformats-binary

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

Abierto
#165 2 comentarios 0 reacciones 0 asignados Ver en GitHub
avro
Lenguaje dominante
Java
Estrellas
347
Forks
156
Merge medio
3 d 3 h
PR fusionados (30 d)
22

Descripción

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
```

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.