Value constructor for char * is crashing on NULL value in current version jsoncpp 0.6.0
In earlier version of Json::value constructor i.e. Value( const char *value ) was handling NULL as parameter gracefully But crashing In version jsoncpp 0.6.0.
Why this change is done, any specific issue related to that?
The NULL literal isn't a const char_, so this would be very dangerous: Value(NULL). You don't know what constructor you're calling. Value(static_cast<const char_>(NULL)) would be more clear, but even then I think the code has a logical problem. A C++ std::string can be constructed with a (const char*)0 in the sense that it compiles, but it's undefined behavior. That string constructor requires that the argument point to an array of char, and passing 0 is a violation of that precondition.
Agreed.