-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
has_key? #12
Comments
Both
which returns |
I'll give this a look when I get back to my computer. If i can figure out
|
I believe I have it figured out. I haven’t actually run the code yet but the line: bool containsKey(const char* Pool); seems to pass the verify built into the IDE. No guarantee it will do what I want it to do though. Is it possible to check for a nested key or do I need to check for the first key (Pool in this case) and then check for subkeys under it? I realize this is an Arduino library and code space is a premium. I’m just ecstatic to have a library to handle JSON that doesn’t eat up too much memory. Mike From: Benoît Blanchon [mailto:notifications@github.com] Both Generator::JsonObject and Parser::JsonObject have the following public method: bool containsKey(const char* key); which returns true if the key is present, and false if not. — |
Ok. It didn’t do what I expected…. From: Benoît Blanchon [mailto:notifications@github.com] Both Generator::JsonObject and Parser::JsonObject have the following public method: bool containsKey(const char* key); which returns true if the key is present, and false if not. — |
Ok. With a little time to think and pull my head out of my ass, I figured it out. Thank you for not replying too quick with an answer… I’d still like to know if it’s possible to check for nested keys without testing at multiple levels. Like I said, if not, it’s no big deal. My life is already easier…. From: Benoît Blanchon [mailto:notifications@github.com] Please have a look at the README files: — |
You could just try to get the value and see if it exists.
|
Is there a reliable method of checking to see if the JSON data contains a given key? The methods I'm trying are all failing horribly and I'm sure it's my fault.
The text was updated successfully, but these errors were encountered: