Hmm, now that I think about it, that may not be a problem for you since your new code is never dealing with the actual Puppet reports, you're just fetching them from PuppetDB... and I think we can guarantee that they will be stringified (JSON) by that point.