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

Refactor JSONRenderer slightly for easier overriding
merge from upstream/master
fix import
remove the loads_function hook