User-defined conversions
Timeroot opened this issue · 0 comments
Timeroot commented
Supporting user-defined conversions (see https://en.cppreference.com/w/cpp/language/cast_operator ) would be a much cleaner alternative to the current .get<T>()
syntax -- and you could continue to have both. Code of the form
std::string str = json_obj["some key"].get<std::string>();
could become
std::string str = json_obj["some key"];