If you've built your own custom MS ASP.NET AJAX controls or extenders, you are familiar with the description process, where a control specifies the values that it wants to send at the creation of the client-side AJAX component (consider these values as default values). ASP.NET AJAX gives you the ability to specify what you would like to pass to the client, and makes available a serializing component (JavaScriptSerializer) to perform a serialization/deserialization process to/from object and string. As an object gets converted to a string, it's then passed to the client- component's client-side property, and from there you have a responsibility to take a serialized serialized and convert it to a deserialized object (JS's equivalency to your server-side component).
In reality, you do not need to use the JavaScriptSerializer class. For instance, you can pass this to the client-side component:
descriptor.AddProperty("a", "{ id: '1', name: '2', dothis: function() { return 'this'; } }");
This is essentially what gets passed to the client when using the JavaScriptSerializer, except for we have the added capability of adding in methods to pass to the client.
get_a: function() { }, set_a: function(val) { The text "this" appears in the alert window, alerting the user of the value. So you have the ability to provide any sort of custom coding that you would like to have appear in the object that gets passed to the client side.
var o = Sys.Serialization.JavaScriptSerializer.deserialize(val);
alert(o.dothis());
}