How to read big json?

后端 未结 3 1278
执念已碎
执念已碎 2020-12-31 06:18

I receive json-files with data to be analyzed in R, for which I use the RJSONIO-package:

library(RJSONIO)
filename <- \"Indata.json\"
jFile <- fromJSON         


        
3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-31 06:45

    Although your question doesn't specify this detail, you may want to make sure that loading the entire JSON in memory is actually what you want. It looks like RJSONIO is a DOM-based API.

    What computation do you need to do? Can you use a streaming parser? An example of a SAX-like streaming parser for JSON is yajl.

提交回复
热议问题