FasterXML / FasterXML/jackson-databind
`@JsonAppend` not following sort order specified in `@JsonPropertyOrder`
- Langage dominant
- Java
- Étoiles
- 3.7k
- Forks
- 1.5k
- Merge moyen
- 3 j 6 h
- PR mergées (30 j)
- 28
Description
`@JsonAppend` javadoc claims to respect `@JsonPropertyOrder` but I'm not seeing that in version 2.9.2:
Simple test case:
```
@Test
public void testAppendOrder() throws Exception {
AppendOrder data = new AppendOrder();
ObjectMapper om = new ObjectMapper();
String json = om.writer().withAttribute("@id", "1").writeValueAsString(data);
System.out.println(json);
assertTrue(json.indexOf("foo") > json.indexOf("@id"));
}
@JsonAppend(attrs = {
@JsonAppend.Attr(value="@id", include= JsonInclude.Include.NON_EMPTY),
})
@JsonPropertyOrder(value = {"@id", "foo"})
private static class AppendOrder {
public String foo = "foo";
}
```
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Évaluation
Cette issue n'a pas encore été évaluée.