Change 'json' and 'error' to local variables

They were instance variables before, but they don't need to be.