This PR modifies the note-taking application to save all notes in a single JSON file named notes.json, instead of saving each note as a separate file. The changes include updating the command handlers for creating and printing notes to read from and write to the notes.json file.
Summary of Changes
Modified the CommandHandler for the root command to append new notes to a list of notes and write the entire list to notes.json.
Modified the CommandHandler for the print command to read notes from the notes.json file and display them in chronological order.
Fixes #10.
To checkout this PR branch, run the following command in your terminal:
git checkout sweep/sweeper-change-json-storage
To get Sweep to edit this pull request, leave a comment below or in the code. Leaving a comment in the code will only modify the file but commenting below can change the entire PR.
Description
This PR modifies the note-taking application to save all notes in a single JSON file named
notes.json
, instead of saving each note as a separate file. The changes include updating the command handlers for creating and printing notes to read from and write to thenotes.json
file.Summary of Changes
CommandHandler
for the root command to append new notes to a list of notes and write the entire list tonotes.json
.CommandHandler
for theprint
command to read notes from thenotes.json
file and display them in chronological order.Fixes #10.
To checkout this PR branch, run the following command in your terminal:
To get Sweep to edit this pull request, leave a comment below or in the code. Leaving a comment in the code will only modify the file but commenting below can change the entire PR.