+ if isinstance(record[key], basestring):
+ pass
+ elif isinstance(record[key], bool):
+ record[key] = 'tak' if record[key] else 'nie'
+ elif isinstance(record[key], (list, tuple)) and all(isinstance(v, basestring) for v in record[key]):
+ record[key] = ', '.join(record[key])
+ else:
+ record[key] = json.dumps(record[key])
+