-
Notifications
You must be signed in to change notification settings - Fork 20.6k
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
[Suggestions] Add a new serialization for Html To JSON #2091
Comments
This seems like a good idea for a plugin. It wouldn't go into jQuery core. |
Originally I was going to write an angry rant about how this was dismissed. Here are some facts. Form <-> Object
Turning form data into json is common practice and the opposite isn't that uncommon though generally reserved for parsing the current search query and populating the search form Form <-> QueryStringjQuery has a QueryString <-> JSON ObjectTurning a serialized String into an object and back can be done by numerous libraries
Why should jquery care?jQuery is a mix of useful wrappers to avoid browser differences as well as make your life easier. Why is there an animate function?-Because animations are one of the things that really made jQuery popular. Why is there a data function?-Because you can store objects by reference. Why is jQuery still using it's own deferred system instead of Bluebird?-because done makes more sense than then in many cases. If forms weren't part of of the dom, you would be right. However forms are an important peice of the dom, arguably the most important. And to brush off supporting it as a finge usecase seems quite shortsighted |
Maybe the jQuery's size is a bit too large..... However these functions areTOO important for us and it is frequently used. So for the jQuery's official side, it would be better to offer this;) |
I would argue if jQueries size is getting too large. Perhaps effects/css need to be moved to a seperate repository. Cross browser compatability for css has also been a huge issue and creating an effective animation suite is not task that wouldn't involve alot of code. However that is a huge change and likely to be in the complete wrong direction as what they want to be |
I fail to see why something like deserialized or serializeObject doesn't make the cut. For what it's worth, you guys make an excellent product and I'd rather praise than criticize. However, I don't enjoy 1 line answers |
Hello all:
It would be nice if I can use JSON formation data to pass where I use $.ajax…….
I found there were lots of functions extended from jQuery. However, none of them satisfies me because it lacks many functions, I searched for many times on the net, no results. Even I use $.serializeArray(), that doesn't meet my needs.
I hope this function can:
2) For radio button tags with the same name, it should ONLY serialize the choosen one.
3) For checkbox button tags with the same name, it should return me an array with the choosen multiple values (even none is choosen, make the empty array left).
4) For the table tag, we should offer customers one choice——isEachRowSeralized. This is a boolean value that indicates whether we need serialize each row as an JSON object, or just serialize the whole table's input values as usual.
Notice for Point 4——NOT ONLY FOR TABLE tag, but other familiar tags as well.
The text was updated successfully, but these errors were encountered: