I have a simple custom class with the Double [] variable to indicate the location of the user.
@Document
public class User {
private long id;
private Double[] location;
}
This is the code I tried with serializing a User object
new JSONSerializer()
.transform(new ArrayTransformer(), Double[].class)
.serialize(object));
But the location field will not be serialized, other fields will be serialized, though .. Can someone help?
Thanks!
source
share