JavaScript - How to handle Json post method - Asked By abinav shankar on 22-Feb-12 11:46 PM


Since i am new to json i need to know what is json and also the post method of json
and also there is a requirement in which i have certain data in dataset ans i have converted it to json using
string strjson = string.Empty;
strjson = Newtonsoft.Json.JsonConvert.SerializeObject(dsGetdetails);

and the output(json) look like the below one

now how to the above json in the jvascript and use the post method
D Company replied to abinav shankar on 26-Feb-12 07:15 AM

interesting question, here is JSON simple syntax

jQuery.extend({postJSON: function( url, data, callback)
    return, data, callback, "json");

//here url is A string contains the URL to which the request is sent.than second parameter Data which map or string that is sent to the server with the request.and than callback function that is executed if the request succeeds.

for more detail

hope its clear