code: public JSONObject toJSON(ModelView o) throws JSONConverterException {
          ModelViewConverter c = java2json.get(o.getClass());
          if (c == null) {
              throw new JSONConverterException("No converter available for a view with the '" + o.getClass() + "' className");
          }
          return c.toJSON(o);
      }
docs: Serialise a view.
  @param o the view
  @return the resulting encoded view