Cloned from http://jsoncpp.sourceforge.net/