I recently needed to serialize a datatable to JSON. Where I\'m at we\'re still on .Net 2.0, so I can\'t use the JSON serializer in .Net 3.5. I figured this must have been
I found this: http://www.bramstein.com/projects/xsltjson/ You can convert your datatable to xml and use a xslt stylesheet to convert the xml to json.
It is more a workaround than a real solution.
Hey budy, its is all here in Rick's blog post Serializing DataTable using Json.NET. He explains in detail how you can accomplish it using Json.NET from James Newton King.
Would it help you convince your bosses to install a library if it's Microsoft's AJAX extensions for .NET 2.0?
Included in them is System.Web.Script.Serialization.JavascriptSerializer, which is used in Step 4 of the last link in your post.