Is there a built in way in .Net AJAX to manually serialize an object to a JSON string?
问题 I've found ScriptingJsonSerializationSection but I'm not sure how to use it. I could write a function to convert the object to a JSON string manually, but since .Net can do it on the fly with the <System.Web.Services.WebMethod()> and <System.Web.Script.Services.ScriptMethod()> attributes so there must be a built-in way that I'm missing. PS: using Asp.Net 2.0 and VB.Net - I put this in the tags but I think people missed it. 回答1: This should do the trick Dim jsonSerialiser As New System.Web