macek/jquery-serialize-object

Dash (minus) is valid in JSON key, but form fields that contain dashes do not seem to be parsed

Clearnine opened this issue · 1 comments

I had a form with a number of field names with dashes. The form name also contained a dash. I did not exhaustivly test to determine if one or the other or both are the problem.

After hacking at it for about an hour I changed the dashes to underscores and everything worked.

macek commented

Unfriendly as it may be, the API docs clearly demonstrate how to override the internal regexp patterns used to power this plugin. I agree that the defaults are a bit opinionated, but you can hack them to your heart's content. Solutions to ease some of those pains are in the works. See #81 for more details.