How to work with a JSON file?

Hello everyone I wish you all the best. Please help me if there is someone more experienced than me here.

I am trying to implement functionality so that my plugin can write data to a JSON file that the user will send an asynchronous request.

I need to store a JSON file in cms files. I need to write a plugin that will accept an asynchronous request with a new JSON file, and update the JSON file on the server.

  1. Where do I store the JSON file?
  2. What code do I need to write in my plugin to get the contents of the JSON file?
  3. What code do I need to write in my plugin to edit the JSON file?

I’m sorry if I made grammatical mistakes, my knowledge of English is not at the highest level.

hi @FedorovDeomid ,
my recommendation is, just search for an existing plugin that deals with JSON files and see how this can be handeled.
then you can derive the code you need for your application from the example (at least you can see hoe to read/write/update data in JSON files).
a simple example is my ipcount plugin which counts website hits and stores the count data in a JSON file.