I have a record like this:
{
"_id" : ObjectId("56eec1271abfdsfsgdfy434kb"),
"gender" : "Male",
"addressList" : [
{
"locId" : NumberLong(1),
"city" : "Somewhere"
},
]
}
When unmarshalling with Jongo in Java, the locId results in a 0 if I use long and it results in a null if I use Long.
I know there is a specific way of unmarshalling ObjectId's, but how does one do it for NumberLong?
The classes I'm unmarshalling it into are:
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import java.util.Date;
import java.util.List;
import org.jongo.marshall.jackson.oid.ObjectId;
public class Collection_Profile {
@ObjectId
@JsonSerialize(using = NoObjectIdSerializer.class)
public String _id;
public String gender;
public List<Collection_AddressList> addressList;
}
and
public class Collection_AddressList {
public long locID;
public String city;
public String state;
}
The city name is being unmarshalled perfectly.
--
You received this message because you are subscribed to the Google Groups "Jongo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jongo-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.