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 ) ; }
Convert a json - encoded constraint .