java - XmlJavaTypeAdapter in MobileFirst 7.1 does not work -
hi using mobile first verison 7.1. have simple adapter returns json response. response contains date , using localdatetime that. not supported jax-rs, use xmljavatypeadapter.
i've created adapter localdatetime , annotated getter (also tried annotating field itself) @xmljavatypeadapter annotation:
@xmljavatypeadapter(localdatetimeadapter.class) public localdatetime getdate() { return date; }
for reason annotation ignored.
found solution, using jackson. i've created jackson serializer , annotated type this:
@jsonserialize(using = localdatetimeserializer.class) private localdatetime date;
Comments
Post a Comment