datasift/datasift-java — pull request #42 by mauricioalarcon (2013-04-23 22:35:27+00:00)
Title: Overloaded methods to provided a convenient way to fall back if the object is not found in the json tree

Hi, we're using the api and found that this could be very helpful since those methods are exposed to the client via *"org.datasift.Interaction.java"*.

The idea is to have a simple "safe" *getStringVal(key, defaultValue)* that wont throw a *"EInvalidData"* exception. All the main methods were overloaded. *(getBooleanVal, getDoubleVal, getIntVal, getLongVal, getStringVal)*

It makes use of the provided *has(String key)* method before attempting the
getter on the json object, if still the object was not found then it throws a RuntimeException explaining the issue.