I've got json string, and I need to load it but it comes from TCP socket so it is in bytes. Normal decoding with utf-8 doesn't work, because in thah string there are float numbers in 4bytes format.
data = b'{"X1":"Cf\x19\x9a","X2":"\x00\x00\x00\x00"}'
how to load this into json.loads?
json.load.\xhhbyte points are just representations of the actual byte values; your data does not contain literal` andx` bytes, each\xHHsequence is one byte. But the hex sequence 19 9A is not a valiid UTF-8 byte sequence, so this can't be parsed as JSON just for that reason.