Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backup/Restore broken due to wrong json encoding #318

Closed
Guerra24 opened this issue Jun 21, 2020 · 1 comment
Closed

Backup/Restore broken due to wrong json encoding #318

Guerra24 opened this issue Jun 21, 2020 · 1 comment

Comments

@Guerra24
Copy link
Contributor

Guerra24 commented Jun 21, 2020

Backup encoding either generates or exports unescaped line breaks at file level causing the restore feature to fail with invalid character encountered while parsing JSON string, at character offset 10071 (before "\r\n series:COMIC Ka...") at /usr/local/share/perl5/site_perl/Mojo/JSON.pm line 39.

Some errors in backup file.

 {
         
   "arcid": "eb39dc6c8077f59a4400d25ebbe21aa70ba1df0f",
            "title":
            "tags":
 "language:english",
            "thumbhash": "36c68ab2019099f6733c7f7aa53e89a60d5cde76",
            "tags": "...",
            "thumbhash":
 "8559991df66fb916550ab607807a9fbce479c3e0",
            "filename": "..."
        },
            "arcid": "1d83b9720f75b90ae4dd082478f39a494c70d850",
            "title": "... ",
            "tags": "...",
            "thumbhash": "ad725888eef5ceefe0afde88187b60824ab9fb56",
            "filename": "...
 ..."
        },

I was not able to replicate it but the file contains \r\n line breaks. I'm not sure what could have caused it but I would suggest using proper json encoding just in case. JSON snippets from Gojira's backup file from discord.

@Difegue
Copy link
Owner

Difegue commented Jul 2, 2020

Removed the last few lines of code that were crafting JSON by hand. Good riddance!

@Difegue Difegue closed this as completed Jul 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants