code: public static String jsonNameVal(final String indent, 
                                     final String name, 
                                     final String val) {
      StringBuilder sb = new StringBuilder();
  
      sb.append(indent);
      sb.append("\"");
      sb.append(name);
      sb.append("\": ");
  
      if (val != null) {
        sb.append(jsonEncode(val));
      }
  
      return sb.toString();
    }
docs: Encode a json name and value for output
  
  @param indent initial space
  @param name of field
  @param val and value
  @return encoded String