Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

JSONType_alphabetic_cn

高铁 edited this page Nov 17, 2016 · 1 revision

配置JSONType.alphabetic属性

fastjson缺省时会使用字母序序列化,如果你是希望按照java fields/getters的自然顺序序列化,可以配置JSONType.alphabetic,使用方法如下:

@JSONType(alphabetic = false)
public static class B {
    public int f2;
    public int f1;
    public int f0;
}
Clone this wiki locally