clone of json_spirit 4.08 from codeproject