import json

result = []

with open("codes.txt", "r", encoding="utf-8") as f:
    for line in f:
        code = line.strip()
        if not code:
            continue
        result.append([None, code, "", None, None, None, None])

# Save JSON
output_path = "/var/www/html/f9/array/master_from_string.json"

with open(output_path, "w", encoding="utf-8") as f:
    json.dump(result, f, ensure_ascii=False, indent=4)

print("Saved to", output_path)
