The Python Oracle

How do I check if a string is valid JSON in Python?

Become part of the top 3% of the developers by applying to Toptal https://topt.al/25cXVn

--

Music by Eric Matyas
https://www.soundimage.org
Track title: Switch On Looping

--

Chapters
00:00 Question
00:29 Accepted answer (Score 307)
00:52 Answer 2 (Score 213)
02:27 Answer 3 (Score 2)
03:34 Answer 4 (Score 0)
04:18 Thank you

--

Full question
https://stackoverflow.com/questions/5508...

Accepted answer links:
[Pythonic]: https://docs.python.org/2/glossary.html#...
[EAFP]: https://docs.python.org/2/glossary.html#...

Answer 2 links:
http://www.json.org/
https://pymotw.com/2/json/
https://metacpan.org/pod/json_xs

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#python #json

#avk47