Skip to content

Telegram parse error #100

@thesingodim

Description

@thesingodim

Error parsing file "result.json":

JSON.parse: bad escaped character at line 33 column 17 of the JSON data
error

Solution:
I exported from telegram group history (129mb) in result.json, then replaced some bad characters with python:

with open('result.json', encoding='utf-8') as f:
    result = f.read()

result  = result.replace('\\x0C','').replace('\\x00','').replace('\\x10','').replace('\\x11','').replace('\\x08','').replace('\\x01','')

with open('r.json','w+', encoding='utf-8') as f:
    f.write(result)```

And now it works! Seems like telegram inserts some bad characters into .json
Thank you for huge work!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpipelineRelated to the pipeline

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions