@ruebot The problem is that on a Windows server, when the viewer caches the JP2 file in the tomcat temp directory, the path to it contains backslashes. These backslashes are misinterpreted by jQuery as escaped characters, making the path invalid. The JP2 image is unable to load inside the viewer as a result.

The purpose of *initially* returning the data as a string is so any backslashes in the path can be converted to forwardslashes, which both *NIX and Windows understand. It then converts the string back to JSON. I tried to find some way of manipulating the path while it was still a JSON object, but was unsuccessful. If anyone has suggestions for how to do this, I'd be glad to give it a try. 

The good news is that the code I've changed only fires once, when the page first loads. After that, other code kicks in while users interact with the viewer. This is why I don't think this patch will negatively impact performance.