Change 'json' and 'error' to local variables

They were instance variables before, but they don't need to be.
Merge pull request #4 from a2/patch-1

Change 'json' and 'error' to local variables