![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@aggul/jquery.serializeobject
Advanced tools
$.serializeObject
is a variant of existing $.serialize
method which, instead
of encoding form elements to string, converts form elements to a valid JSON
object which can be used in your JavaScript application.
Whilst it isn't necessary in most cases, and by that I mean 99.99% kind of most, there are times when we manipulate form data on client side. Personally I find JSON much easier to work with than DOM or string manipulation.
If you want to see the code and demo first: http://jsfiddle.net/davidhong/PRpJT/
Simply include the jQuery.serializeObject.js
along with any jQuery
instance
and use it like $.serialize
.
If you have a form
like the following:
<form id="minutes">
<input type="text" name="subject">
<input type="text" name="minute-taker">
<!-- ... -->
<input type="checkbox" name="attendees" value="David" checked="checked">
<input type="checkbox" name="attendees" value="Daniel" checked="checked">
<input type="checkbox" name="attendees" value="Darwin" checked="checked">
</form>
and wish to convert them to a JSON object:
var minutes = $('form#minutes').serializeObject();
will return:
{
"subject": "",
"minute-taker": "",
"attendees": [
"David",
"Daniel",
"Darwin"
]
}
Major version change: Camel casing of names have been removed. Please use version 1.0.4 if you require camel casing of names.
$.data
like camelCasing on namesFAQs
A jQuery plugin to turn form data into JSON
We found that @aggul/jquery.serializeobject demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.