1
0
mirror of https://github.com/nlohmann/json synced 2024-12-04 17:20:06 +00:00
nlohmannjson/doc/examples/basic_json__nullptr_t.cpp
2016-08-31 17:07:35 +02:00

16 lines
269 B
C++

#include <json.hpp>
using json = nlohmann::json;
int main()
{
// implicitly create a JSON null value
json j1;
// explicitly create a JSON null value
json j2(nullptr);
// serialize the JSON null value
std::cout << j1 << '\n' << j2 << '\n';
}