-
-
Notifications
You must be signed in to change notification settings - Fork 587
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
Allow to typehint for the type (array/hash) of the root item to be serialized #728
Conversation
@schmittjoh what do you think? |
After thinking for some time on how to deal with this, i can suggest:
The approach uses "string" and "integer", "float"... (an explicit key type definition) to define when an array is a hash.
This approach makes it a bit differently, using the first parameter to specify when an array is a hash.
This approach is even more explicit, but introduces new types. The approach 1 and 2 is compatible with
Currently the approach I prefer is the 2. |
BC version of #698
Fixes schmittjoh/JMSSerializerBundle#373 #709 #706 schmittjoh/JMSSerializerBundle#375
Closes #475 #248 #234
Examples: