leesj-dev / classroom-notifier

Classroom Notifier aims to send automated notification emails when any post in a Google Classroom is edited or deleted.
1 stars 0 forks source link

Use YAML instead of JSON #9

Closed leesj-dev closed 2 years ago

leesj-dev commented 2 years ago

I am planning to switch the links.json file to links.yaml because we can add comments to specify the name of the classroom in YAML, but not in JSON.

For example, in JSON:

{
    "1": "Google Classroom Link No. 1",
    "2": "Google Classroom Link No. 2",
    "3": "Google Classroom Link No. 3"
}

Meanwhile, in YAML:

---
'1': Google Classroom Link No. 1  # Classroom Name
'2': Google Classroom Link No. 2  # Classroom Name
'3': Google Classroom Link No. 3  # Classroom Name

Since YAML is a superset of JSON, parsing YAML into a Python dictionary wouldn’t be too hard.