If you have the pleasure of writing sandbox solutions, perhaps for Office365, you know that doing so involves a wide variety of creative workarounds. Serialization is one area where this creativity comes into play.
The problem with the XMLSerializer is that it creates and loads a serialization assembly on the fly. This doesn’t work in the sandbox. A good discussion and one solution to this problem is discussed here: Using the Application Setting Manager in Sandboxed Solutions.
An alternative approach is discussed here: Serialization Inside SandBox Solutions.
A terrific overview of this class can be found here on Rakki Muthukumar’s blog: ASP.NET – JSON – Serialization and Deserialization.
Author: Doug Ware