code: public static String toJsonString(Object object, FieldModifier modifier, JsonMethod method) throws IllegalAccessException {
          JSONObject jsonObject = new JSONObject();
          StringBuilder builder = new StringBuilder("{");
          boolean isManual = false;
          if (Checker.isNotNull(object)) {
              Class<?> bean = object.getClass();
              Field[] fields = bean.getDeclaredFields();
              for (Field field : fields) {
                  int mod = field.getModifiers();
                  boolean addable =
                          modifier == FieldModifier.ALL || (modifier == FieldModifier.PRIVATE && Modifier.isPrivate(mod)) || (modifier == FieldModifier.PUBLIC && Modifier.isPublic(mod));
                  if (addable) {
                      field.setAccessible(true);
                      isManual = Checker.isIn(method, METHODS);
                      if (isManual) {
                          Object f = field.get(object);
                          if (Checker.isNotNull(f)) {
                              builder.append(converter(field.getName(), f));
                          }
                      } else {
                          jsonObject.put(field.getName(), field.get(object));
                      }
                  }
              }
          }
          return isManual ? builder.substring(0, builder.length() - 1) + "}" : jsonObject.toString();
      }
docs: 将Bean类指定修饰符的属性转换成JSON字符串
  
  @param object Bean对象
  @param modifier 属性的权限修饰符
  @param method {@link JsonMethod}
  
  @return 没有格式化的JSON字符串
  
  @throws IllegalAccessException 异常