Describe the bug
ROOT interpreter crashes silently (even debug build) when a key with non-null value is added to a nlohmann::json object and semicolon at the end of line is omitted.
Expected behavior
No crash, the contents of the json object displayed correctly.
To Reproduce
$ root -l
root [0] #include "nlohmann/json.hpp"
root [1] nlohmann::json j
(nlohmann::json &) {}
root [2] j["nothing"] = nullptr
(nlohmann::basic_json<std::map, std::vector, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> > > &) {}
root [3] j["1"] = 1;
root [4] j["2"]
(nlohmann::basic_json<std::map, std::vector, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::value_type &) {}
root [5] j["3"] = 3
$ # silent crash
Setup
ROOT v6.36.06
Built for linuxx8664gcc on Dec 06 2025, 07:41:55
From tags/6-36-06@6-36-06
With clang version 20.1.8 (AlmaLinux OS Foundation 20.1.8-1.el10.alma.1)
Binary directory: /opt/root-6.36.06-debug/bin
Additional context
I reproduced the bug in ROOT v6.36.06 shipped via dnf, as well as in debug builds of v6.36.06 and v.6.38.00, both built with -Dbuiltin_nlohmannjson=ON.