Click to See Complete Forum and Search --> : I need a JSON encoder/decoder for ASP.NET 2.0


decibel
07-20-2010, 02:57 PM
Hi,

I'm a PHP developer asked to convert an application in ASP.NET. All I need is a simple to install, simple to call function to convert an array to a JSON string and back. I'm writing my script in VB. Please help me, this can't be so difficult! Unfortunately I can only write for ASP.NET 2

Thanks.

decibel
07-20-2010, 08:31 PM
Ok well I've downloaded and installed ASP.NET AJAX 1.0 for .NET 2.0, found here:
http://www.microsoft.com/downloads/en/confirmation.aspx?familyId=ca9d90fa-e8c9-42e3-aa19-08e2c027f5d6&displayLang=en

And I've ran the installer, restarted IIS, but I'm still not having any luck, here's what I'm trying to do in my code:


<%@ Page Language="VB" %>

<%@ Import Namespace="System.Web.Script.Serialization" %>

<%
Dim serializer as New JavaScriptSerializer()

''Dim arrayJson as String = serializer.Serialize(myArray)
%>


Am I way off or is there something else I need to do to script to find the extension or configure the server for it to work? Is JavaScriptSerializer not included in this package?

Thanks for any insight.