Closed eddyclhung closed 1 year ago
I think I just found the solution. We just need to register the module.
For JsonMapper
, we need to use addModules
instead.
SimpleModule dateTimeModule = new SimpleModule();
dateTimeModule.addSerializer(Calendar.class, new CalendarSerializer());
dateTimeModule.addDeserializer(Calendar.class, new CalendarDeserializer());
dateTimeModule.addSerializer(Date.class, new DateSerializer());
dateTimeModule.addDeserializer(Date.class, new DateDeserializer());
final JsonMapper jsonMapper =
JsonMapper.builder()
.addModules(dateTimeModule)
...
Hi Eddy. Were you able to register the module successfully? Please let us know (with some additional details) if you think there is a bug.
Hi Eddy. Were you able to register the module successfully? Please let us know (with some additional details) if you think there is a bug.
I was able to implement this feature by registering the module. Thanks, @kqarryzada.
Does anyone know when using the Meta object, how do we properly convert fields in
Calendar
type into a timestamp String in ISO8601 format while serializing into a JSON object? Thanks.https://github.com/pingidentity/scim2/blob/a2edbb693bb2f65c1a30dc12f155e399a7117c1d/scim2-sdk-common/src/main/java/com/unboundid/scim2/common/types/Meta.java#L38