Wat u want to do exactly?, wats ur server's response type?, u dont really need to worry about Searlization if u r using Jquery.
If server's response is an XML u need to set the option 'dataType' to 'XML' in ur ajax call and have the success handler as below in which u could use the standard ways to access data in it
success: function(XMLObj) {
//XMLObj is an XMLDoc and u could use standard ways to access data in it
}
If its JSON then u need to set the optionto 'JSON' in ur ajax call and have the success handler as below in which u could access the returned data as normal javascript object
success: function(jsonData){
jsonData.FieldName1 // access just like normal javascrip object, field names should be as in DTO
}
Ramesh T
Contributor
5171 Points
833 Posts
Re: How to Deserilize in jquery ?
Feb 29, 2012 04:28 PM|LINK
Hello Mate,
Wat u want to do exactly?, wats ur server's response type?, u dont really need to worry about Searlization if u r using Jquery.
If server's response is an XML u need to set the option 'dataType' to 'XML' in ur ajax call and have the success handler as below in which u could use the standard ways to access data in it
success: function(XMLObj) { //XMLObj is an XMLDoc and u could use standard ways to access data in it }If its JSON then u need to set the optionto 'JSON' in ur ajax call and have the success handler as below in which u could access the returned data as normal javascript object
success: function(jsonData){ jsonData.FieldName1 // access just like normal javascrip object, field names should be as in DTO }Cheers,
R