Tried reading my JSON data(extracted from a zip file) into an R-object using following code:
myHistory <- fromJSON("Takeout/Location History/Location History.json")
But Upon execution, getting the following error:
Error: lexical error: invalid char in json text. Takeout/Location History/Locati (right here) ------^
Kindly help
Sample data of JSON File:
> { "locations" : [ {
> "timestampMs" : "1467382628714",
> "latitudeE7" : 286423676,
> "longitudeE7" : 773812320,
> "accuracy" : 688,
> "activity" : [ {
> "timestampMs" : "1467382628569",
> "activity" : [ {
> "type" : "IN_VEHICLE",
> "confidence" : 61
> }, {
> "type" : "UNKNOWN",
> "confidence" : 20
> }, {
> "type" : "STILL",
> "confidence" : 10
> }, {
> "type" : "ON_FOOT",
> "confidence" : 5
> }, {
> "type" : "WALKING",
> "confidence" : 5
> }, {
> "type" : "ON_BICYCLE",
> "confidence" : 3
> } ]
> } ] }