code: public static synchronized void register(JSONObject type) {
      Class<? extends JSONObject> previous = registrations.put(type.getIdentifier(), type.getClass());
      if (previous != null && !previous.isInstance(type))
        throw new RuntimeException("Attempt to register conflicting classes for identifier: " + type.getIdentifier());
      if (previous == null)
        log.debug("Registered {} to {}", type.getIdentifier(), type.getClass());
    }
docs: Registers the given JSONObject as a supported deserialization type so that
  {@link #fromJSON(String)} can create instances magically. Idempotent.