-
Notifications
You must be signed in to change notification settings - Fork 432
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
Doesn't work with ASP.NET MVC naming conventions #129
Comments
It seems you expect the plugin to handle a different syntax. This plugin works with the syntax Instead of key.nested.nested:
This plugin uses key[nested][nested]:
In addition, you need to tell the plugin to interpret the numbers as array indexes with the option $(myform).serializeJSON({useIntKeysAsArrayIndex: true}); This will produce the expected serialization. Is is possible to serialize the with the dot syntax key.nested.nested?Currently not. But I am open to a pull request suggestion to incorporate this syntax with an option like |
Hi, |
Can you please share which library is it? Couse I have the same issue. |
Here is the repo : |
I tried to use this library to serialize a complex form into json to send it as model in my controller but the list items are not serialized correctly.
Name exemple : foo.bar[0].prop
Serialization :
"foo.bar" : { "0.prop" : "value1", "1.prop" : "value2", "2.prop" : "value3", }
Should be :
"foo" : { "bar" : [ {"prop" : "value1"}, {"prop": "value2"}, {"prop": "value3"} ] }
The text was updated successfully, but these errors were encountered: