FasterXML / FasterXML/jackson-databind

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

Ouverte
#2,877 4 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Java
Étoiles
3.7k
Forks
1.5k
Merge moyen
3 j 6 h
PR mergées (30 j)
28

Description

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.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.