@Target(value={ANNOTATION_TYPE,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 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.
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
Copyright © 2012 FasterXML. All Rights Reserved.