Refactor JSONRenderer slightly for easier overriding
Merge pull request #1750 from tomchristie/json-renderer-refactor

Refactor JSONRenderer slightly for easier overriding