I am using Microsoft.Net with Breeze for APIs and the results I get using Retrofit have nested repeated same objects. For example EmployeeJob has Customer navigation property so the APIs result looks like this
{
Id:1,
"Customer_Id": 39,
"Customer": {
"$id": "1",
"CourtesyTitle": "Mr",
"FirstName": "Ahmad"
}
}
{
Id:2
"Customer_Id": 39,
"Customer": {
"$ref": "1" //here same customer Ahmad
},
}
Now the Java List I get of these EmployeeJobs has only one copy of each customer and others are replaced with $refs. How can I map the $ref:"2" to its original value instead of this $ref.
I don't want my server APIs to send the complete objects for network and performance reasons, that's why I want to deserialize these $refs on client side just like Angularjs $resource service does for us.
I am using Microsoft.Net with Breeze for APIs and the results I get using Retrofit have nested repeated same objects. For example EmployeeJob has Customer navigation property so the APIs result looks like this
Now the Java List I get of these EmployeeJobs has only one copy of each customer and others are replaced with $refs. How can I map the $ref:"2" to its original value instead of this $ref.
I don't want my server APIs to send the complete objects for network and performance reasons, that's why I want to deserialize these $refs on client side just like Angularjs $resource service does for us.