I added the following to json11.hpp ``` /// @weepy additions operator long() { return (long) int_value(); } operator int() { return int_value(); } operator float() { return (float) number_value(); } operator double() { return (double) number_value(); } operator std::string() { return string_value(); } operator bool() { return bool_value(); } operator object() { return object_items(); } operator array() { return array_items(); } ``` It makes using json11 much more convenient as the compiler will auto cast your variables for you, eg: ```int id = myJson["id"];```
I added the following to json11.hpp
It makes using json11 much more convenient as the compiler will auto cast your variables for you, eg:
int id = myJson["id"];