Feb 20th, 2012, 09:21 PM
Spring & JQuery Nested Object Formatting $.post
I was digging into something interesting I saw...JQuery likes to format parameters using  instead of .
Has anyone written a filter/request wrapper/something to handle this?
Take this example, you want to post the following to the server.
Send it as JSON, life is good. Do $.post(...), not as much. It comes across as:
But Spring (the BeanWrapper) wants:
I wrote up a quick filter to inject a custom RequestWrapper around the request that does some magic to convert the parameter names. Seems to work, but is there a better way to do this? Or something in Spring that handles it?
Tags for this Thread