Hacker News new | ask | show | jobs
by staycoolboy 2146 days ago
Yes, it has null, but when you parse it with, say, Boost::property_tree, null is 0, which is not true null because there is no true null in C++. Language limitation.

Cool link, btw. For all the years I've been using JSON I never visited the main page!

1 comments

So that's not a problem in JSON. Why can't the library output nullptr?
nullptr isn't "null", it's a null POINTER. In languages with a NULL type, and variable can be a NULL. E.g., in python you can say "x = null; x = 1;" in C++ you cannot say "int i = nullptr".