danielaparker/jsoncons — pull request #3 by MarkaPola (2014-01-21 10:56:53+00:00)
Title: add template methods is<> and as<> to facilitate json handling as part o...

...f templates

This change is a proposition to extend basic_json class, as well as support ones (const_val_proxy and object_key_proxy), with two template methods enabling dynamic type handling. This extension is useful in case of usage of json as part of some other template.

To check current type of json object:
template
bool basic_json::is ();

types basic_json::object_type and basic_json::array_type are added to enable usage of method is<> with specific json objects.

To retrieve types value from json object:
template
T basic_json::as ();