Clone of JSON Spirit from Codeproject.com