code: public static String param(JavaScriptObject js) {
      Properties prop = js.cast();
      String ret = "";
      for (String k : prop.keys()) {
        ret += ret.isEmpty() ? "" : "&";
        JsCache o = prop.getArray(k).cast();
        if (o != null) {
          for (int i = 0, l = o.length(); i < l; i++) {
            ret += i > 0 ? "&" : "";
            Properties p = o.<JsCache> cast().getJavaScriptObject(i);
            if (p != null) {
              ret += k + "[]=" + p.toJsonString();
            } else {
              ret += k + "[]=" + o.getString(i);
            }
          }
        } else {
          Properties p = prop.getJavaScriptObject(k);
          if (p != null) {
            ret += k + "=" + p.tostring();
          } else {
            String v = prop.getStr(k);
            if (v != null && !v.isEmpty() && !"null".equalsIgnoreCase(v)) {
              ret += k + "=" + v;
            }
          }
        }
      }
      return ret;
    }
docs: Returns a QueryString representation of a JavascriptObject.
  
  TODO: jquery implementation accepts a second parameter (traditional)