FasterXML / FasterXML/jackson-databind

Allow for multiple `@JsonAnySetter` when `@JsonUnwrapped` is supplied

オープン
#2,877 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Java
スター
3.7k
フォーク
1.5k
平均マージ
3日 6時間
マージ済み PR(30日)
28

説明

I am dealing with JSON where properties for certain areas are prefixed with given values. For example,

```json
{
"key" : "val1",
"@key" : "val2",
"$key" : "val3"
}
```

should be represented as a bean of three categories of property:

```java
class Bean {
@JsonAnySetter
Map normal;
@JsonAnySetter
@JsonUnwrapped(prefix = "@")
Map ats;
@JsonAnySetter
@JsonUnwrapped(prefix = "$")
Map dollars;
}
```

I understand that this is rather comples but the serialization works just fine. It would be brilliant being able to deserialize a JSON property if any property would only match one of the unwrapped specifications whereas any other property would end up in the non-unwrapped target.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。