JSON store data instead of database

So, I want to have a JSON API/Endpoint, from where I can get data using a get request and UPDATE the JSON using a post request so the data is “stored”. Is this possible? I don’t wanna use a database. Can I store the data in an object or what should I do?