I have a class DbRecord
public class DbRecord {
@JsonField(name="on_duties")
List<OnDutyElement> onDuties;
@JsonField(name = "date_time")
DateTime dateTime;
When I try to serialize an object of this class, the LoganSquare doesn't include the dateTime field.
Generated JSON: {:"2015-12-21T11:32:17.503-05:00","on_duties":[{...everything normal from here
Probably, there is a bug. Write your own
TypeConverterthat extendsDateTypeConverter, overrideserialize()method explicit passwriteFieldNamewith valuetrue.This will force the type converter write field name to the writer.