Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re^10: Rogue character(s) at start of JSON file (BOM; dumping references)by Bod (Parson) |
on Jan 19, 2023 at 21:11 UTC ( [id://11149706]=note: print w/replies, xml ) | Need Help?? |
Yes indeed it should be UTF-8 but we've already established that the file has "strange" (being polite) encoding...
This takes about 10 minutes to read the 462Mb JSON file then fails with Decoding JSON fileWide character in subroutine entry at import.pl line 24 Given the time taken to open the file in UTF-8 and the error, I am thinking there is some nasty encoding hidden somewhere in this file UPDATE Changing the encoding like so takes about 5 minutes to open the file but gives the strange error Decoding JSON fileKilled "Strange" because the error doesn't include at import.pl line 24! Another UPDATE It seems I might be running out of memory...380400 records in the JSON file seems to be too much...
In Section
Seekers of Perl Wisdom
|
|