Hmm json.dumps seems to lock the thread. Not needed so deleted