This code: ``` cpp json j = { { "foo", 65536 } }; int16_t v = j["foo"].get<int16_t>(); std::cout << v << "\n"; ``` prints ``` 0 ``` Probably, it would be better, if `get` thrown some exception (maybe `std::out_of_range`).
This code:
json j = { { "foo", 65536 } }; int16_t v = j["foo"].get<int16_t>(); std::cout << v << "\n";prints
Probably, it would be better, if
getthrown some exception (maybestd::out_of_range).