Maybe your analysis prgram has a bug or the json got distorted in the printing and saving process. The activities endpoint creates a json array, a single root is not expected here.
How are you getting the JSON output? The general format for the returned array should look something like this, where the entire output is enclosed in square brackets []
indicating an array, and each activity is enclosed in curly braces {}
as an entry in the array.
[
{
"resource_state" : 2,
"athlete" : {
"id" : 1,
"resource_state" : 1
},
"name" : "Activity #1",
"other_fields" : "values"
},
{
"resource_state" : 2,
"athlete" : {
"id" : 1,
"resource_state" : 1
},
"name" : "Activity #2",
"other_fields" : "values"
}
]
If you are seeing multiple root elements, maybe you missed copying the enclosing square brackets around the whole thing? You could also try running the JSON through https://jsonlint.com/ to see what problems it highlights.