import json


def update_json(row, fields):
    """Add data to the taxon_json field."""
    taxon_json = json.loads(row.taxon_json)
    for field in fields:
        if row[field]:
            taxon_json[field] = row[field]
    return json.dumps(taxon_json, ensure_ascii=False)