Fix error for Python 3 when decoding JSON

json module doesn't allow byte string in Python 3.