Posted on: 11/22/2013 7:06:54 PM | Views : 768

Can someone please explain to me how to interprete the scripts below?

$.post("Authorization/Validate", { data: JSON.stringify({ LoginName: "jdoe",Password: "jdoe" }) }, function (data) { var token = JSON.parse(data); } ); Line 2 generates the following JSON string and sends it to the Authorization/Validate method. { "LoginName":"cropu", "Password":"cropu" } Line 3 receives the following JSON response from the Authorization/Validate method. { "Value":{ "TokenId":17, "LoginName":"jdoe", "Created":"2011-03-01T15:09:08", "Expires":"2011-03-22T15:09:08", "Token":"83b362ad-7b2b-451e-a8ae-78df3c653be9", "LastUsed":"2011-03-01T15:09:08" }, " ...

Go to the complete details ...