Created
December 19, 2014 14:34
-
-
Save wyyqyl/333280b8c98f4084aacd to your computer and use it in GitHub Desktop.
test if val["1"]["2"]["3"] is bool
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Json::value val; | |
val = val["1"]; | |
if (val.isNull() || !val.isObject()) { | |
return false; | |
} | |
val = val["2"]; | |
if (val.isNull() || !val.isObject()) { | |
return false; | |
} | |
val = val["3"]; | |
if (!val.isBool()) { | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment