code: public String toJson(boolean pretty, String... attributeNames) {
          StringBuilder sb = new StringBuilder();
          toJsonP(sb, pretty, "", attributeNames);
          return sb.toString();
      }
docs: Generates a JSON document from content of this model.
  
  @param pretty pretty format (human readable), or one line text.
  @param attributeNames  list of attributes to include. No arguments == include all attributes.
  @return generated JSON.