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

Infinite loop with big JSON #36

Open
dayvsonsales opened this issue Jan 26, 2021 · 0 comments
Open

Infinite loop with big JSON #36

dayvsonsales opened this issue Jan 26, 2021 · 0 comments

Comments

@dayvsonsales
Copy link

Hello, I have a 5MB JSON file that sometimes comes with some problems, like missing closing-bracket, missing commas, or missing array closing. Your script seems to get into an infinite loop when running towards this JSON file.

I have done a small JSON file with the same problems that the big one and your script returned no expected result.

const r = dJSON.parse(`[{"id":2222,"username":"a","maxViewers":927,"userId":2222,"countryCode":"br","viewers":290,"broadcastTime":148,"broadcastType":"solo","goldPartyWinner":false,"accessLevel":"general","dailyAward":true,"monthlyAward":false,"adminVerified":true,"hdStream":false,"vrStream":false,"showType":"NORMAL","source":"desktop","privateRoom":false,"newPerformer":false,"blockedRegions":["604"],"languages":["pt","en","es"]`);

console.log(JSON.stringify(r));

Result: "["
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

1 participant