bytes vs. characters
bytes vs. characters
Posted Apr 16, 2015 23:19 UTC (Thu) by Cyberax (✭ supporter ✭, #52523)In reply to: bytes vs. characters by dbaker
Parent article: Report from the Python Language Summit
> Because the JSON spec requires that strings must be unicode?
Yes, but the reality outside is a little bit different.
Yes, but the reality outside is a little bit different.
> Can't you just write a custom object_hook function to pass to the decoder to solve your problem?
No, 'encoder' parameter is ignored in json.loads and everything else already gets decoded strings.
We simply switched to a third-party library instead.