code: public static void toJSONString(OutputAccessor out, Map<String, ? extends Object> map) {
  
          writeObjectStart(out);
          boolean first = true;
  
          for (Map.Entry<String, ? extends Object> entry : map.entrySet()) {
  
              if (first) {
                  first = false;
              } else {
                  writeKeyValueSeparator(out);
              }
  
              writeMapEntry(out, entry.getKey(), entry.getValue());
          }
  
          writeObjectEnd(out);
  
      }
docs: Utility method to write a {@link Map} into a JSON representation.
  
  @param out
  @param map