I need to give the result to users as a JSON object, and I cache the result.
In some cases, users change this result object, and a modified version is available to consecutive users. To avoid this, I am currently cloning the result, but this leads to heavy overhead as a very large JSON object.
So, I want JSON to read only to give a result and avoid the cloning process. How to make a JSON object inaccessible for editing?
source
share