code: public static void jsonMap(JsonWriter writer, Map<String, Object> map) throws IOException {
          if (map != null) {
              writer.beginObject();
              jsonMapEntries(writer, map);
              writer.endObject();
          }
      }
docs: Transforms a Map object into a JSON object (stream).