I'm using FOSRestBundle and JMSSerializerBundle to output JSON data to be consumed by an ember application. I would like to use the built-in adapters of ember-data and the JSON format that is expected has to have a root name. My current JSON is as follows:
{
"user_id": 1
"first": "Dan"
"email": "dan@email.com"
}
Ember expects, and what I want is:
{
"user":
{
"user_id": 1
"first": "Dan"
"email": "dan@email.com"
}
}
User is the name of the entity. I'm pretty sure this is just a configuration thing, but looking through the documentation I can't seem to find what to set. I have tried @XmlRoot, but that doesn't seem to have an affect on the resulting JSON (expected).