You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 15, 2022. It is now read-only.
Harald Pehl edited this page Oct 29, 2012
·
1 revision
Ordering in Piriti
Order
Piriti processes all annotated fields in random order. If you depend on a specific order, you can use the order attribute. Suppose you have the following model:
public class User
{
@Json(order = 0) String username;
@Json(order = 2) String firstname;
@Json(order = 1) String surname;
@Json int age;
@Json boolean valid;
}
When reading / writing JSON data the fields are proceesed in this order