Replace json-generator with gem

Hey folks, I've extracted the json-generator code to it's own gem as we had initially planned. I can still merge the pull request myself, but want to hear your thoughts first.