Introduction
在開發Rest API時,透過Jackson提供的API,將物件轉為json或xml格式。它曾經算是效能最好的函式庫之一,現在就不一定了。
- Jackson - Hello World
- From 2.4.5 to 2.7.1
- 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
- DeepClone with Jackson
留言
張貼留言