Friday, April 20, 2012

Javascript from the command line 2

I already wrote about this here: Javascript from command-line on Mac OS X.
Here is another tip.
The console.log() is not available for jsc, and you have to use the debug() API.
In order to keep using the console.log() calls just define:
var console = {log:function(msg){debug(msg);}}

Enjoy,
Alex

Wednesday, April 11, 2012

JSON.NET for ASP.NET

I had to add a JSON service to a very old ASP.NET 2.0 website I worked on quite awhile back.
Upgrading to the latest ASP.NET 4.0 was not an option. So the first thing that comes in mind is to quickly implement Http handler. Here is a pretty nice JSON serialization library that I stumbled upon and that worked for me quite well: http://json.codeplex.com