code: private JSONArray emitOperations(ObjectName objName) throws Exception {
          MBeanServer mBeanServer = ManagementFactory.getPlatformMBeanServer();
          MBeanInfo mBeanInfo = mBeanServer.getMBeanInfo(objName);
          JSONArray ar = new JSONArray();
  
          MBeanOperationInfo[] operations = mBeanInfo.getOperations();
          for (MBeanOperationInfo operation : operations) {
              JSONObject obj = new JSONObject();
              obj.put("name", operation.getName());
              obj.put("description", operation.getDescription());
              obj.put("returnType", operation.getReturnType());
              obj.put("impact", operation.getImpact());
  
              JSONArray params = new JSONArray();
              for (MBeanParameterInfo param : operation.getSignature()) {
                  JSONObject p = new JSONObject();
                  p.put("name", param.getName());
                  p.put("type", param.getType());
                  params.put(p);
              }
              obj.put("params", params);
              ar.put(obj);
          }
          return ar;
      }
docs: Generate JSON for the MBean operations
  
  @param objName
  @return
  @throws Exception