how to convert python string binary representation to json

31 views Asked by At

i am trying to convert this file reference string to JSON

"{'file_reference':
b'\\x04~\\x9eaR\\x00\\x00\\x00\\x05e\\xeb;~6t\\x035\\x95=\\xf4D\\xb4\\xfc\\xb4\\x95>\\x03\\x10\\xd4'}"

using

JSON.parse()

but when parsing to JSON am getting this error

Unexpected token 'b', ..."ference": b"\x04~\x9"... is not valid JSON

also I am getting

Expected double-quoted property name in JSON error

and also

how to I solve this?

0

There are 0 answers