提问人:Soren 提问时间:12/13/2017 最后编辑:storagedSoren 更新时间:3/3/2018 访问量:3026
Jsonlite:错误:解析错误:过早的 EOF
Jsonlite: Error: parse error: premature EOF
问:
我正在尝试使用 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)
有什么提示吗? 谢谢。
答: 暂无答案
评论
cat()
print(quote=FALSE, …)