-
-
Notifications
You must be signed in to change notification settings - Fork 312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Force uppermost level of output json as object #555
Comments
addressed in schmittjoh/serializer#728 |
Can I implement this for now or I have to wait for new realise? And if I could can give little tutorial how to make this in global state? Thanks. |
you can try the PR, but since is still in work progress, it might change.
i'm not sure what you mean as "global state". data are serialized depending on how you configure them. If you want something as: {
prop: [
// some data
]
} you can use a wrapper object for all your responses. but
syntactically is not correct, you need to have some property ( |
Newbie mistake of understanding json format... Sorry. Many thanks for quick answer! |
So my problem is to set force all outputs as objects like next example:
Can you advice me how to do that? I deep into the core, I read many issues about this and all tell about back problem "How to convert object to array".
I think it could be done by setting root, but I don't understand how can I global to do that...
I use FOSRestBundle with jms annotations.
The text was updated successfully, but these errors were encountered: