I was new to the spring restful with Jackson and Hibernate OGM. I'm getting JSON format as below from web request
"Order":
{
"Orderdata": [ {"orderNo" : "1","location":"A"},{"orderNo" : "2","location":"B"},..]
}
Pojo class for order
class Order implements Serializable{
@ElementCollection
private List<OrderData> Orderdata = null;
//getter and setter
}
After inserting the document into MongoDB. I'm getting as below
"Order": {
"Orderdata": [
{
"Orderdata": {"orderNo" : "1","location":"A"}
},
{
"Orderdata": {"orderNo" : "2","location":"B"}
},
...
]}
Here I need to avoid the "Orderdata" name inside the each document created. Please help me to resolve this issue.