import json


def write_json(filename, data):
    """Saves data to a json file."""
    with open(filename, 'w', encoding='utf-8') as file:
        json.dump(data, file, sort_keys=False, indent=4, ensure_ascii=False)

    return True