how to send jqGrid data in json format to server? DO I have to use any external library or script to achieve that?
Thanks!
update1: extra licensePlateNumber
should not be there
[
{
"licensePlateNumber": ""
},
{
"licensePlateNumber": "0000000000000029000721804",
"sku": "795127",
"description": "",
"caseQuantity": "24",
"isHeld": "false",
"expirationDate": "Jul 22, 2010 12:00:00 AM"
},
{
"licensePlateNumber": "0000000000000029000722323",
"sku": "795127",
"description": "",
"caseQuantity": "24",
"isHeld": "false",
"expirationDate": "Jul 22, 2010 12:00:00 AM"
},
{
"licensePlateNumber": "0000000000000029000722669",
"sku": "795127",
"description": "",
"caseQuantity": "24",
"isHeld": "false",
"expirationDate": "Jul 22, 2010 12:00:00 AM"
}
]
Your approach from your other question is OK, but
jQuery.ajax
has problems to serialize arrays. The most reliable and standard way (see here and here as examples) which I see is to serialize all jqGrid data to JSON (for example with respect of JSON.stringify function:the names of parameters
jgGridData
,customData
and so on, you can choose whatever you like.