code: public Constraint fromJSON(Model mo, JSONObject in) throws JSONConverterException {
          checkKeys(in, "id");
          Object id = in.get("id");
          ConstraintConverter<? extends Constraint> c = json2java.get(id.toString());
          if (c == null) {
              throw new JSONConverterException("No converter available for a constraint having id '" + id + "'");
          }
          return c.fromJSON(mo, in);
      }
docs: Convert a json-encoded constraint.
  
  @param mo the model to rely on
  @param in the constraint to decode
  @return the resulting constraint
  @throws JSONConverterException if the conversion failed