Examples:
// ensure that "id" and "name" are output before other properties
@JsonPropertyOrder({ "id", "name" })
// order any properties that don't have explicit setting using alphabetic order
@JsonPropertyOrder(alphabetic=true)
This annotation may or may not have effect on deserialization: for basic JSON handling there is no effect, but for other supported data types (or structural conventions) there may be.
Note
annotation is allowed for properties, starting with 2.4, mostly to support
alphabetic ordering of java. entries.
| Modifier and Type | Method and Description |
|---|---|
| public boolean | alphabetic()
Property that defines what to do regarding ordering of properties not explicitly included in annotation instance. |
| public String[] |
| alphabetic | back to summary |
|---|---|
| public boolean alphabetic() Property that defines what to do regarding ordering of properties not explicitly included in annotation instance. If set to true, they will be alphabetically ordered; if false, order is undefined (default setting) | |
| value | back to summary |
|---|---|
| public String[] value() Order in which properties of annotated object are to be serialized in. | |