* @param expectedAction the expected value of the 'action' key in the JSON
*/
public ActionBase(JSONObject json, String expectedAction) {
try {
if (!json.getString("action").equalsIgnoreCase(expectedAction))
throw new JSONException(expectedAction + " action expected");
uid = json.getString("uid");
} catch (JSONException e) {
e.printStackTrace();