I have this form
<form name="pass_form" id="form" >
Username: <input type="text" name="username" id="username" > </br>
Current password: <input type="password" name="currentpass" id="currentpass"> </br>
New password: <input type="password" name="newpass" id="newpass"> </br>
New password confirmation: <input type="password" name="newpassconf" id="newpassconf"> </br>
<input type="button" value="Update" onclick="myCall()" />
I would like to have the above form on submit be made into json string as the one shown below . I have taken care of the validation and have been trying to make the json string with no avail
{"jsonrpc":"2.0","method":"changepass","params":["username","currentpass","newpass"],
"id":"1"}
In the server side i would like to get it as such and use it in my RPC function in Perl