Tag Archives: Javascript

JSON and classic ASP

Serializing JSON in VB is relatively easy.  Parsing and juggling it is another story.  I’ve been scratching my head all weekend thinking how easy it was to play with it in Javascript and Actionscript but I had so far only been doing it client side.  Then I found this page:

http://stackoverflow.com/questions/1019223/any-good-libraries-for-parsing-json-in-classic-asp

Oddly enough, the _last_ solution (using a hybrid vb/jscript page) is brilliant.  I didn’t realize you could read your VB objects in JScript server side.  A small tweak to the standard json2.js file at json.org let me use their parser server side with some easily ported client-side javascript code I already had.  Thought the job would take all day and it only ended up taking the afternoon.  We now have Excel (CSV) reports generated server side for accountants from Fresher’s JSON sales reports.  Lovin it.  :)