2 ms·
I think worries about reflection are overthinking the problem for the most part. This has carried me for 99% of all use cases along with a try/catch that barfs
by CoolGuySteve 7y ago
I think worries about reflection are overthinking the problem for the most part.
This has carried me for 99% of all use cases along with a try/catch that barfs and an array specialization that makes a vector:
template<typename T> T get(const char* key) { return boost::lexical_cast<T>( json.GetObject(key) ); }
The reality is that if I see some value of a type I wasn't expecting, something probably went wrong or changed in the protocol anyways.