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