code: public JsonWriter value(Map<String, ?> map) throws IOException {
        if (map == null) {
           nullValue();
        } else {
           boolean inObject = inObject();
           if (!inObject) beginObject();
           for (Map.Entry<String, ?> entry : map.entrySet()) {
              property(entry.getKey(), entry.getValue());
           }
           if (!inObject) endObject();
        }
        popIf(JsonTokenType.NAME);
        return this;
     }
docs: Writes a map
  
  @param map the map to be written
  @return This structured writer
  @throws IOException Something went wrong writing