The Python Oracle

How to get string objects instead of Unicode from JSON

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: Luau

--

Chapters
00:00 Question
01:05 Accepted answer (Score 116)
04:38 Answer 2 (Score 189)
06:31 Answer 3 (Score 146)
07:59 Answer 4 (Score 76)
09:22 Thank you

--

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

Question links:
[json]: https://docs.python.org/2/library/json.h...
[simplejson]: https://pypi.python.org/pypi/simplejson/

Accepted answer links:
[Mark Amery's function]: https://stackoverflow.com/a/13105359/170...
[the documentation]: https://docs.python.org/2/library/json.h...

Answer 2 links:
[PyYAML]: http://pyyaml.org/
[YAML]: https://en.wikipedia.org/wiki/YAML
[correctly parses very low numbers]: https://stackoverflow.com/questions/3045...
[Ruamel YAML]: https://bitbucket.org/ruamel/yaml
[from Mark Amery]: https://stackoverflow.com/questions/9568...
[answer from Mirec Miskuf]: https://stackoverflow.com/a/33571117/116...

Answer 3 links:
[Mirec Miskuf's answer]: https://stackoverflow.com/a/33571117/170...

Answer 4 links:
[json.loads]: http://docs.python.org/library/json.html...
[json]: http://docs.python.org/library/json.html
[Wells shows]: https://stackoverflow.com/questions/9568...

--

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

--

Tags
#python #json #serialization #unicode #python2x

#avk47