Q:

JSON response from Ajax service

can any one help me on the query below.
I am making an ajax web service call from java script, the web method returns the custom objet, serialization of the object into JSON format is taken care by the Ajax architecture and am not doing any explicit serialization. most of the times I get response properly as below, this gets deserialized and assigned to the variable in my ajax call back function and this works fine.
assuming the variable that holds the response as "result", I can access the the data as result._type, result.Action.
{"__type":"Thomson.Financial.RTThomlets.Ajax.State.AjaxCallResult","Action":"Initialize"} 

If I close all the browsers and clear the cache and reopen the application the same method returns the response as below
{"d":{"__type":"Thomson.Financial.ThinQuotes.Ajax.State.AjaxCallResult","Action":"Initialize"}}

additional object d is being created automatically, as a result d is assigned to the variable in callback, so when I try to access data as result._type, I get error as this is now under d object.
can any one explain whats going wrong here.
Regards
Chandra.

A:

The "d" is being added automatically by the framework to handle a XSS vulnerability.  Here is a link that can explain it for you, http://encosia.com/2009/02/10/a-breaking-change-between-versions-of-aspnet-ajax/.

