I use FOSRestBundle and JMSSerializerBundle to output the JSON data that will be consumed by the ember application. I would like to use the built-in ember-data adapters and the JSON format, which is expected to have a root name. My current JSON looks like this:
{
"user_id": 1
"first": "Dan"
"email": "dan@email.com"
}
Ember is expected and I want:
{
"user":
{
"user_id": 1
"first": "Dan"
"email": "dan@email.com"
}
}
User is the name of the object. I am pretty sure that this is just a configuration, but looking through the documentation, I cannot find what to install. I tried @XmlRoot, but this does not seem to affect the JSON result (expected).
source
share