0

I am using jsonlite to parse json values. json data set has arrays which jsonlite does not seem to be parsing.

dataset:

{"basicException":[{"assembly":"WCFTestCalcModel, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null","count":1,"method":"WCFTestCalcModel.ICalculator.AddNumbers","outerExceptionMessage":"Input string was not in a correct format."},{"parsedStack":[{"method":"System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage","assembly":"mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","level":0,"line":0},{"method":"System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke","assembly":"mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","level":1,"line":0}],"hasFullStack":true,"id":"12116171","outerId":"0","message":"Input string was not in a correct format.","count":0}],"internal":{"data":{"id":"f7ca6e6f-eed1-4a0c-8e12-c14374e286c6","documentVersion":"1.61"}}}

script:

x<- stream_in(file("E:\\Temp\\AzureErrorLog\\ErrorLog1-sub.json"))

How do i parse these array values into a data frame

thanks

kumar
  • 8,207
  • 20
  • 85
  • 176
  • What do you want the result to look like? The JSON in your dataset is not inherently a table; few quantities repeat. It's really more of a nested list. See `prettify(yourJSON)`. – alistaire Jan 24 '16 at 06:40

1 Answers1

0

Because Json is nested you cannot put the whole object into a data frame. You need to parse it and then extract elements from the list object into a data frame.

Dirk Nachbar
  • 542
  • 4
  • 16