given a simple entity class like this
公共类用户
{
@JsonProperty
公共日历创建on;
@JsonProperty
公共字符串名称;
}
isthereawayformetohookintothejacksonstreamingapitocustomdeserializeonlythecreatedonfield? If there's not,thenwouldsomethinglikethisbepossibleinthefuture?
公共类用户
{
@JsonProperty
@ JSON转换器(mycustomcalendarconverter.class )。
公共日历创建on;
@JsonProperty
公共字符串名称;
}
itappearsthaticouldcustomdeserializetheentireentity.I ' mjustcuriousifthereisawaytocustomizethedeserializationjustafieldatatation ializationa e in order to,for example,customparseaparticulardateformat,orreadanarrayofvaluesintoacustomentity,etc.whileleleler
解决方案
youcandefinecustomserializeaspecificfieldusing @ JSON serialize :
@ JSON串行化(using=mucustomcalendarconverter.class ) )。