Abstraction

Created a doJson method to allow for easy expansion