This is the JSON format that I get from Ember js when I make a POST request. I use RestAdapter to make an API call. { "programmer": { "firstName": "Janaki", "lastName": "Rathinam" } }
But my spring boot would accept only
{
"Programmer": {
"id": 1,
"firstName": "Maha",
"lastName": "Shankar"
}
}
How do I resolve this mismatching JSONs so that I can make a POST call from emberjs. Will adding Serializer resolve my issue? If yes how do I write a serializer for this?
Aucun commentaire:
Enregistrer un commentaire