Jackson
Introduction
在開發Rest API時,透過Jackson提供的API,將物件轉為json或xml格式。它曾經算是效能最好的函式庫之一,現在就不一定了。
Articles
- Convert the key fields with special char @JsonSerialize(keyUsing=KeySerializer.class)
- Convert the Date format to ISO8601 @JsonSerialize(using=Serializer.class) @JsonDeserialize(using=Deserializer.class)
- Optionally ignore some fields @JsonIgnore @JsonIgnoreProperties
- The visibility of the fields @JsonAutoDetect
- Convert the value fields with special char @JsonSerialize @JsonDeserialize
Resource
- How to rename element names? @JsonProperty(“contractor”)