I have a problem to read json file by using jsonlite::fromJSON
. It shows error message as below:
Error in fromJSON(file = jsonfile.names[1]) : unexpected character 'N'.
It is a problem with NaN
values in the json file. If I remove or change all the NaN
to strings or numbers, fromJSON
works just fine.
A sample of my data follows below:
{"name": NaN,
"unit_price": 130848,
"amount": 11,
"up_to_data_sales": 45725}
Is there any solution to solve this problem without manually changing the json file?
Thanks in advance!