@Target(value=TYPE) @Retention(value=RUNTIME) public @interface JsonPropertyOrder
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 has no effect on deserialization.
Modifier and Type | Optional Element and Description |
---|---|
boolean |
alphabetic
Property that defines what to do regarding ordering of properties
not explicitly included in annotation instance.
|
String[] |
value
Order in which properties of annotated object are to be serialized in.
|
public abstract String[] value
public abstract boolean alphabetic