code: public static void toJson(Object object, JsonBuffer output) {
  		if (object == null) {
  			return;
  		}
  		for (final Method method : object.getClass().getMethods()) {
  			try {
  				if (!method.isSynthetic() && !Modifier.isStatic(method.getModifiers()) && method.getParameterCount() == 0
  					&& (method.getReturnType().isPrimitive() || String.class.equals(method.getReturnType())
  						|| method.getReturnType().isEnum())) {
  					final String name = method.getName();
  					if (name.startsWith("get") && name.length() > 3) { //$NON-NLS-1$
  						output.add(makeName(name, 3), method.invoke(object));
  					} else if (name.startsWith("is") && name.length() > 2) { //$NON-NLS-1$
  						output.add(makeName(name, 2), method.invoke(object));
  					}
  				}
  			} catch (Exception e) {
  				//
  			}
  		}
  	}
docs: Replies the string representation of the given object.
  
  <p>The string representation is based on  the values replied by the getters (functions
  that are starting by "get" or "is" or "has").
  
  @param object the object to analyze.
  @param output the Json string representation.
  @since 15.0