Open phraktle opened 3 years ago
A similar inconsistency in Deribit DTOs prevents bi-directional Jackson serialization. The timestamp
field (which is of type long) vs getTimestamp
(of type Date
) in Trade
and Settlement
. A workaround for these is to ignore the getter:
ObjectMapper mapper = new ObjectMapper();
mapper.setVisibility(PropertyAccessor.ALL, Visibility.NONE);
mapper.setVisibility(PropertyAccessor.FIELD, Visibility.ANY);
Many DTOs have inconsistencies that break JSON serialization, such as divergent getter method names. It should be possible to serialize then de-serialize these objects.
As a workaround, one can use Jackson mixins. For example this provides a fix for serializing
BitmexPrivateOrder
: