Modifying the JournalEntry class to be JSON-compatible
At present, all app data is lost when you quit the app. You will need to implement a way to save your app data. iOS provides many ways to store your app data. One of them is converting the data to JavaScript Object Notation (JSON) format, and then writing it as a file to your device storage. JSON is a way to structure data in a file that can be easily read by both people and computers.
To help you to understand the JSON format, look at the sample shown below:
[
{
"dateString": "May 17, 2023"
"rating": 5
"entryTitle": "Good"
"entryBody": "Today is a good day"
"photoData": "<photo data for the sun.max image>"
"latitude":
"longitude":
},
{
"dateString": "May 17, 2023"
"rating": 0
"entryTitle": "Bad"
"entryBody...