I am loading JSON files into a string and transform the data into an array. The JSON content will be an array of objects with totally variable structure.
What I want is to calculate the memory that will be required to decode the JSON data, to prevent the PHP script from running out of memory (and thus crashing).