Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
class Bean { private String x,y,z,a,b,c; //Getters & Setters }
使用 struts2 json 插件,为上述 bean 生成的 json 是按字典顺序排列的
这个 [reference] 说,自JDK 6起,它以声明顺序受支持,但在 JSON 响应中,我看到字段按字典顺序排列。
有没有办法在生成的 JSON 中实现声明顺序?