code: public JSONObject marshal(final AccessAssertion assertion) {
          final JSONObject jsonObject = assertion.marshal();
          if (jsonObject.has(JSON_CLASS_NAME)) {
              throw new AssertionError("The toJson method in AccessAssertion: '" + assertion.getClass() +
                                               "' defined a JSON field " + JSON_CLASS_NAME +
                                               " which is a reserved keyword and is not permitted to be used " +
                                               "in toJSON method");
          }
          try {
              jsonObject.put(JSON_CLASS_NAME, assertion.getClass().getName());
          } catch (JSONException e) {
              throw new RuntimeException(e);
          }
  
          return jsonObject;
      }
docs: Marshal the assertion as a JSON object.
  
  @param assertion the assertion to marshal