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

dexie-export-import: JSON formatting is invalid in exports #854

Closed
travddm opened this issue May 28, 2019 · 2 comments
Closed

dexie-export-import: JSON formatting is invalid in exports #854

travddm opened this issue May 28, 2019 · 2 comments

Comments

@travddm
Copy link
Contributor

travddm commented May 28, 2019

Dexie.js version 2.0.4
dexie-export-import version 1.0.0-alpha.10
-> Using all default options

While exporting and importing a large database (>600 MB), the JSON generated by the export was invalid.

After parsing the file with jsonlint, the problem seemed to be that there were missing commas between objects in large arrays. (expected between objects: "},{" vs found between objects: "}{") Throughout the whole file, I only found about 30 instances of these missing commas.

After replacing each "}{" with "},{", the database imported properly without any problems.

I suspect this issue may only be apparent in larger sets of data, and I also suspect it has something to do with objects being separated right on the start/end of each streaming chunk.

@dfahlander
Copy link
Collaborator

Thanks. I'll try to find a way to trigger this in a unit test and fix. Feel free to help me with the unit test if you'd have the time to make a PR

dfahlander added a commit that referenced this issue May 28, 2019
dfahlander added a commit that referenced this issue May 28, 2019
@dfahlander
Copy link
Collaborator

I found the issue and it should be fixed now. Try with the latest release on npm (1.0.0-beta.11)

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