Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
JSON_HEX_TAGS-like functionality
>>> import simplejson
>>> print simplejson.dumps({"foo<>":"<>bar&"}, cls=simplejson.JSONEncoderForHTML)
{"foo\u003c\u003e": "\u003c\u003ebar\u0026"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment