"Data" is apparently a const int, and you're trying to return a non-const reference to it. That's not allowed (as the compiler so kindly tells you). Make "Data" non-const, stick with a const T& return type, or don't return a reference. Those are basically your choices. ...
When using get<your_type>(), your_type MUST be DefaultConstructible. (There is a way to bypass this requirement described later.) In function from_json, use function at() to access the object values rather than operator[]. In case a key does not exist, at throws an exception that you...