1
0
mirror of https://github.com/minimaxir/big-list-of-naughty-strings.git synced 2025-09-09 21:50:47 +02:00

update JSON + code for handling backslash issues in future

This commit is contained in:
Max Woolf
2015-08-18 23:47:00 -07:00
parent be250725e1
commit dc88f34496
2 changed files with 268 additions and 32 deletions

View File

@@ -18,6 +18,9 @@ with open('../blns.txt', 'r') as f:
# insert empty string since all are being removed
content.insert(0, "")
# special case: convert "\" to "\\" for valid JSON
#content = map(lambda x: x.replace('\','\\'), content)
with open('../blns.json', 'wb') as f:
# write JSON to file; note the ensure_ascii parameter