blob: 8e3dda347f6de983c75e8280b82da76daf0bdd0d [file] [edit]
#include <iostream>
#include <nlohmann/json.hpp>
using nlohmann::json;
int main()
{
// create a non-empty JSON array
json j = {1, 2, 3};
// exception other_error.502
try
{
json::to_bjdata(j, false, true);
}
catch (const json::other_error& e)
{
std::cout << e.what() << '\n';
}
}