translate: json cleanup improvement

This commit is contained in:
mutantmonkey
2013-11-01 21:54:37 -07:00
parent 3988a73ade
commit e195830e0a
2 changed files with 10 additions and 9 deletions

View File

@@ -34,6 +34,7 @@ def translate(text, input='auto', output='en'):
while ',,' in result:
result = result.replace(',,', ',null,')
result = result.replace('[,', '[null,')
data = json.loads(result)
if raw: