FasterXML / FasterXML/jackson-dataformats-binary

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

未关闭
#165 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
avro
主要语言
Java
星标
347
派生
156
平均合并
3 天 3 小时
30 天内合并 PR
22

描述

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

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。