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.
杰克逊将 long x = 1234 序列化为 {x:1234} 出于几个原因,我需要 {x:"1234"}
任何杰克逊注释?
谢谢。
以下注解可用于序列化 long as 字符串:
@JsonSerialize(using=ToStringSerializer.class) public long getId() { return id; }