code: public static Date getDate(JSONObject json, String key) {
          return getDate(json, key, null);
      }
docs: Returns the value of a JSON property as a Date if it exists otherwise returns null.
  @param json the JSONObject to check.
  @param key the key.
  @return the value for the key as a Date.