Hi,
I have probably missed something simple but JSONNull is not acting as
I expect. At least in my current testing phase my incoming JSON data
does contain some "null" values. In Perl terms my in-bound JSON
object is an array of hashes.
I can get the JSON string and parse it. I create te JSONObject and am
trying to do some sanity checking of the contents. It is common for
me to want to ask the question, "Does the current JSONObject have the
key "foo" and is the value of that key NOT null?"
if (data.containsKey("foo") && ! data.get("foo").isNull().toString
().equals("null")
The thing is this always fails. I must be doing the null test
incorrectly but a fix is not immediately apparent.
ideas?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---