com.tapstream.sdk.wordofmouth.DelegatedJSONObject Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tapstream-core Show documentation
Show all versions of tapstream-core Show documentation
This library contains the building blocks for a Tapstream Java SDK
package com.tapstream.sdk.wordofmouth;
import org.json.JSONException;
import org.json.JSONObject;
class DelegatedJSONObject {
protected final JSONObject delegate;
protected DelegatedJSONObject(JSONObject delegate){
this.delegate = delegate;
}
protected String getOrDefault(String key, String d){
try {
return delegate.getString(key);
}catch(JSONException e){
return d;
}
}
protected int getOrDefault(String key, int d){
try {
return delegate.getInt(key);
}catch(JSONException e){
return d;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy