added sample using some JSON.NET code
some rather important string munging to get code formatting like markdown without cheating
misc refactoring