Skip to content

Conversation

@dmccoystephenson
Copy link
Member

No description provided.

Introduce an interface for persisting and retrieving project data using JSON serialization, including methods for writing and reading project lists.
…ad of strings

Adjust JSON read/write methods to handle `Project` objects, ensuring type consistency and better alignment with domain model.
Introduce comprehensive tests to validate the behavior of `ProjectJsonReaderWriterImpl`, including scenarios for empty input, null handling, overwriting data, and field preservation.
Include `jackson-databind` dependency for JSON processing support.
Add `app.projects.file` property pointing to `test-projects.json` to support test project setup.
Introduce `app.projects.file` configuration property to specify the JSON file path for project data. Add `JsonConfig` for `ObjectMapper` bean definition. Update `ProjectJsonReaderWriterImpl` to handle reading and writing `Project` objects as JSON.
Refactor `ProjectRepository` to utilize `ProjectJsonReaderWriter` for JSON-based project persistence. Load projects on initialization and write changes to JSON upon modifications.
@dmccoystephenson dmccoystephenson linked an issue Jul 24, 2025 that may be closed by this pull request
Comment on lines +20 to +22
@TestPropertySource(properties = {
"app.projects.file=test-projects.json"
})
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is unnecessary since we've specified the property in the test application.yaml

@dmccoystephenson dmccoystephenson merged commit 5b7452d into main Jul 24, 2025
@dmccoystephenson dmccoystephenson deleted the feat/persist-with-json branch July 24, 2025 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Save projects as JSON

1 participant