I have run into an odd issue where it appears that loading a JSON file using fromJSON() causes the file to become corrupted without ever explicitly writing. Apologies for the large reprex file, but it seems to be more common on large files such as this one. The code to reproduce is simply:
json = jsonlite::fromJSON(filepath, flatten = TRUE)
json = json$features #unclear if this is necessary to reproduce
On running this, the file size of the json is reduced by ~20MB. If you then try to load the file again as above, it rightfully returns the following error:
Error in parse_con(txt, bigint_as_char) : parse error: premature EOF
Link: https://drive.google.com/file/d/1aX5nq9iOY-BTxqqIQgnoKqFiMeTaLY0a/view?usp=sharing
Thank you for your help on this and for a fantastic package!
I have run into an odd issue where it appears that loading a JSON file using
fromJSON()causes the file to become corrupted without ever explicitly writing. Apologies for the large reprex file, but it seems to be more common on large files such as this one. The code to reproduce is simply:On running this, the file size of the json is reduced by ~20MB. If you then try to load the file again as above, it rightfully returns the following error:
Link: https://drive.google.com/file/d/1aX5nq9iOY-BTxqqIQgnoKqFiMeTaLY0a/view?usp=sharing
Thank you for your help on this and for a fantastic package!