<p>According to this article <a href="http://msdn.microsoft.com/en-us/library/cc197951(VS.95).aspx" rel="nofollow noreferrer">Silverlight 2 Beta 2</a> supports the <code>DataContractJsonSerializer</code> object. But, when I try to use it VS says </p>

<blockquote>
  <p>"Type 'DataContractJsonSerializer' is not defined".</p>
</blockquote>

<p>I have a method marked as ScriptableMember that gets called from JavaScript and is passed an Object. Inside this method I need to serialize the object to a string (preferably JSON) and then save it in isolated storage.</p>

<p>Does Silverlight 2 Beta 2 really support DataContractJsonSerializer? Or would anyone recommend a different method of saving the JavaScript created ScriptObject in the Isolated Storage?</p>

For now, the only solution to this that I have found is to use the ASP.NET AJAX JavaScriptSerializer to do the JSON serialization/deserialization in JavaScript, and then just use Silverlight to store/retrieve the resulting string.
```
```
Sys.Serialization.JavaScriptSerializer.serialize(obj);
Sys.Serialization.JavaScriptSerializer.deserialize(json);
```
```