add template methods is<> and as<> to facilitate json handling as part o... #3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
...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 ();