The internal representation of JSON strings is as C-style null-terminated strings, and when a JSON string containing a null character, such as "\u0000\u0001" is put into this internal representation, no checking is done as to whether there are null characters. Thus, all JSON strings read by jsoncpp are quietly truncated at the first null character. This is particularly baffling to the user when null is the first character in a long string and jsoncpp is returning the empty string. This is clearly a JSON compliance bug.
That is right Peter I have the same problem. Although I am not sure where exactly the problem occurs - during parsing Json::Reade::parse() or during representation Json::Value::asString() ?
We've also come across this problem lately and I've added the patch 3610134 for 0.6.0-rc2 which should add support for \0 characters.
https://sourceforge.net/tracker/?func=detail&aid=3610134&group_id=144446&atid=758828
If you want to test/try it, I'm sure the feedback will be appreciated!
UTF-8 with embedded zeroes is now supported at: https://github.com/open-source-parsers/jsoncpp/