I have got a requirement where business people would be uploading the xml files (not more than 25 file) as multimedia components and we need to expose them as JSON. I started on the POC and after a bit of trial and error I am able to achieve it as below.
Is this approach achievable in Prod environment? As i am doubtful that It might cause an issue (memory leaks, etc) in an environment where the WCM is used heavily and performance is the highest priority. I am getting this thought seeing memory stream and xml files of sizes around 2MB.
I am confused in deciding the approach even though the below is working because I am fairly new to these kind of stream objects.