PyBites - #Python trick we learned this week: if json.loads complains about invalid JSON, you can try to convert your string to a dict using ast. literal_eval: | Facebook
![Tip 88 Parse with literal_eval(). Pythonic Programming — by Dmitry… | by The Pragmatic Programmers | The Pragmatic Programmers | Medium Tip 88 Parse with literal_eval(). Pythonic Programming — by Dmitry… | by The Pragmatic Programmers | The Pragmatic Programmers | Medium](https://miro.medium.com/v2/1*LiIv2gDKxXgTjXckXkwP0w.jpeg)
Tip 88 Parse with literal_eval(). Pythonic Programming — by Dmitry… | by The Pragmatic Programmers | The Pragmatic Programmers | Medium
Rephrase ast.literal_eval() to remove any security warranty · Issue #95588 · python/cpython · GitHub
![Python ast.literal_eval on dictionary string not working (SyntaxError: invalid syntax) - Stack Overflow Python ast.literal_eval on dictionary string not working (SyntaxError: invalid syntax) - Stack Overflow](https://i.stack.imgur.com/bCvic.png)