Since forward slashes can only occur in strings inside a JSON serialized object and are not escaped (in the default settings), using
json.dump(some_dict).re
Use escape_forward_slashes as per ujson doc,
escape_forward_slashes
escape_forward_slashes Controls whether forward slashes (/) are escaped. Default is True:
>>> ujson.dumps("http://esn.me") '"http:\/\/esn.me"' >>> ujson.dumps("http://esn.me", escape_forward_slashes=False) '"http://esn.me"'
See here.