Is this not only to tell the render method to 'not print the tagname in the case of JSON'?
I may be wrong but I have the impression that this is a known thing that is prepared and the fix would be really easy.
As I say, I may be wrong ...