I’m developing an activity classifier that I’d like to input using the JSON format of CoreMotion data.
I am getting the error:
Unable to parse /Users/DewG/Downloads/Testing/Step1/Testing.json. It does not appear to be in JSON record format. A SequenceType of dictionaries is expected
I've verified that the format I am using is JSON via various JSON validators, so I am expecting I'm just holding it wrong. Is there an example of a JSON file with CoreMotion data that I can model after?
Try flattening the fields and putting them in an array like this:
[
{
"date" : "2025-07-09T01:24:03Z",
"activity" : "BestActivity",
"confidence" : 0.977258026599884,
"id" : "A3473CBB-D3CF-4371-B150-E00BA1518BF6",
"mlAnnotated" : true,
"model" : "FILLTHISIN",
"modelVersion" : "FILLTHISIN",
"pitch" : 0.7971696055429895,
"roll" : 0.2853617665740398,
"yaw" : 0.9832477411686631,
"sampleType" : "motionUpdate",
"time" : 773703581.004733
}, ...
]