JSON was not supposed to be a database.
If you want to save the data in JSON format,
- Read the JSON entries in your Java application and create data objects.
- Change data objects in a Java application.
- When the application closes, write down the JSON entries.
You are better off using a real database, relational or NoSQL, to store your data and write JSON records when needed.
source share