After a lot of attempts, I discovered that if you remove a part of the json file, you have to remove the png files as well and rename all of the following files so that there is no discontinuity in the numbering of the png files.
For example, if you delete files 0052.png, 0053.png, 0054.png...