Fix json decode error in Python 3