python convert binary string to json