0

I am trying to convert a JSON file to dataframe using jsonlite library in R. Unfortunately many columns in the dataframe are containing lists of unequal length in them.

library(jsonlite)
a <- fromJSON(file.choose(),flatten=TRUE,simplifyDataFrame=TRUE)</b></br>

I am not able to attach the sample file as it too huge. Is there any way to overcome this in a generic way? If anything specific with this file please let me know

{
"qqqqqq": {
"Id": "444444",
"AddDate": "2015-04-08T22:48:26.287-05:00",
"Person": {
"Id": "666666",
"AddUserId": "SYSTEM_USER",
"AddDate": "2013-01-05T18:08:41-06:00",
"PostalAddress": {
"Id": "777777",
"AddUserId": "SYSTEM_USER",
"AddDate": "2013-01-05T18:08:41-06:00" 
},
"PostalAddress": {
"Id": "234234234",
"AddUserId": "SYSTEM_USER",
"AddDate": "2013-01-05T18:08:41-06:00" 
} 
} 
},
"qqqqqq": {
"Id": "66666",
"AddDate": "2015-04-08T22:48:26.287-05:00",
"Person": {
"Id": "33333",
"AddUserId": "SYSTEM_USER",
"AddDate": "2013-01-05T18:08:41-06:00",
"Phone": "9494949494"
"PostalAddress": {
"Id": "7878787",
"AddUserId": "SYSTEM_USER" 
},
"PostalAddress": {
"Id": "545454",
"AddUserId": "SYSTEM_USER",
"AddDate": "2013-01-05T18:08:41-06:00" 
} 
} 
} 
}
Jaap
  • 81,064
  • 34
  • 182
  • 193
blues
  • 1
  • 2

0 Answers0