Jsonlite:错误:解析错误:过早的EOF

时间:2017-12-13 10:09:11

标签: r eof jsonlite

我试图用Jsonlite将这些数据读入R:

"{\"Transaction\": [{\"RetailStoreID\":\"2005\",\"WorkstationID\":\"1\",\"SequenceNumber\":6944,\"Items\":[\"2017-12-04T16:10:32\"],\"ItemsElementName\":[\"BeginDateTime\"],\"OperatorID\":{\"Value\":\"15668\"},\"OperatorLogonID\":{\"Value\":\"15668\"},\"CurrencyCode\":\"DKK\",\"TlogName\":\"1162.tlg\",\"TlogOffset\":\"1095151\",\"FREEDOM_WorkstationType\":\"IS2\",\"Items1\":[{\"TillID\":\"1\",\"RevenueCenterID\":\"FAKTA\",\"ReceiptDateTime\":\"2017-12-04T16:10:32\",\"FREEDOM_TransactionEndCalloutOffline\":false,\"LineItem\":[{\"SequenceNumber\":4,\"Item\":{\"Items\":[{\"POSItemID\":\"5701049015356\"},{\"Level\":\"Department\",\"Text\":[\"999\"]}],\"ItemsElementName\":[\"POSIdentity\",\"MerchandiseHierarchy\"],\"Description\":\"K"

但我收到错误:

  

解析错误:EOF过早。

我的代码如下所示:

g<-readLines(file("poslog.json"), warn=FALSE,skipNul = TRUE)
json_df<-fromJSON(g,simplifyVector = TRUE)

任何提示? 感谢。

0 个答案:

没有答案