jQuery Based Form To JSON And JSON To Form Converter - JSONify

File Size: 5.62 KB
Views Total: 2735
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   
jQuery Based Form To JSON And JSON To Form Converter - JSONify

JSONify is a very small Form & JSON converter which helps you serialize form data into JSON objects (or strings) or fill up form fields with matching key names specified in the JavaScript.

How to use it:

1. The JSONify plugin requires jQuery library loaded properly in the document.

<script src="//code.jquery.com/jquery.min.js"></script>
<script src="src/jsonify.js"></script>

2. Serialize your forms into JSON objects using jsonify() method.

$("#form").jsonify();

3. Return JSON strings instead.

$("#form").jsonify({stringify : true});

4. The JavaScript to generate a form populated with dynamic data defined in the JavaScript as follows:

$("#form").dejsonify({
  "email": "[email protected]",
  "password": "123456"
});

Change log:

2017-10-15

  • v0.3.2: fixes invalid null check

This awesome jQuery plugin is developed by kushalpandya. For more Advanced Usages, please check the demo page or visit the official website.