code: private void writeMap(String fieldName, Object value) throws IOException
     {
        @SuppressWarnings("unchecked")
        Map<String, Object> map = (Map<String, Object>) value;
        m_writer.writeStartObject(fieldName);
        for (Map.Entry<String, Object> entry : map.entrySet())
        {
           Object entryValue = entry.getValue();
           if (entryValue != null)
           {
              DataType type = TYPE_MAP.get(entryValue.getClass().getName());
              if (type == null)
              {
                 type = DataType.STRING;
                 entryValue = entryValue.toString();
              }
              writeField(entry.getKey(), type, entryValue);
           }
        }
        m_writer.writeEndObject();
     }
docs: Write a map field to the JSON file.
  
  @param fieldName field name
  @param value field value