is it possible that json would be 'undefined' here?