}
result = byteString;
break;
case MAP:
DataMap map = (DataMap) value;
DataSchema valueDataSchema = ((MapDataSchema) dataSchema).getValues();
Map<String, Object> resultMap = new DataMap(map.size() * 2);
for (Map.Entry<String, Object> entry : map.entrySet())
{
String key = entry.getKey();
path.add(key);
Object entryAvroValue = translate(path, entry.getValue(), valueDataSchema);
path.remove(path.size() - 1);
resultMap.put(key, entryAvroValue);
}
result = resultMap;
break;
case ARRAY:
DataList list = (DataList) value;
DataList resultList = new DataList(list.size());
DataSchema elementDataSchema = ((ArrayDataSchema) dataSchema).getItems();
for (int i = 0; i < list.size(); i++)
{
path.add(i);
Object entryAvroValue = translate(path, list.get(i), elementDataSchema);
path.remove(path.size() - 1);