fix json decoding in python 3