// write mapFields
g.writeRaw("\n ");
g.writeObjectFieldStart("mapFields");
for (String key : record.getMapFields().keySet()) {
// g.writeStringField(key, record.getMapField(key).toString());
g.writeRaw("\n ");
g.writeObjectFieldStart(key);
Map<String, String> map = record.getMapField(key);
for (String mapKey : map.keySet()) {
g.writeRaw("\n ");
g.writeStringField(mapKey, map.get(mapKey));