Problem when serializeObject

Feb 5, 2009 at 11:11 PM
I created a simple function to try to serialize a string value into json, but got error.  I used stable Json.Net version 3.0

protected void Page_Load(object sender, EventArgs e)
{
string product = "MC SC";
string output = JavascriptConvert.SerializeObject(product);
myTextBox.text = output;
}

The error I got was "Could not load file or assembly 'System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.

the StrackTrace is:
   at Newtonsoft.Json.JsonSerializer.Serialize(JsonWriter jsonWriter, Object value)
   at Newtonsoft.Json.JavaScriptConvert.SerializeObject(Object value, JsonConverter[] converters) in D:\Newtonsoft\Releases\Json\3.0\trunk\Src\Newtonsoft.Json\JavaScriptConvert.cs:line 458
   at Newtonsoft.Json.JavaScriptConvert.SerializeObject(Object value) in D:\Newtonsoft\Releases\Json\3.0\trunk\Src\Newtonsoft.Json\JavaScriptConvert.cs:line 433
   at WebApplication1.default2.Page_Load(Object sender, EventArgs e) in C:\Documents and Settings\bdo\My Documents\Visual Studio 2005\Projects\NetToJson\WebApplication1\default2.aspx.cs:line 20
   at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
   at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
   at System.Web.UI.Control.OnLoad(EventArgs e)
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Does anyone get the similar error?

Thanks,
Brian
Coordinator
Feb 6, 2009 at 12:05 AM
.NET 3.5 is required.
Feb 14, 2009 at 3:06 AM
It works beautifully.

Thanks
Brian