code: @SuppressWarnings("unchecked")
      public static Contract load(InputStream idlJson, Serializer ser) throws IOException {
          return new Contract(ser.readList(idlJson));
      }
docs: Loads the IDL from the given stream using an arbitrary serializer and returns
  a Contract.
  
  @param idlJson Stream containing serialized IDL
  @param ser Serializer implementation to use
  @return Contract based on the IDL stream
  @throws IOException if there is a problem reading the stream, or if deserialization fails