Storyline xAPI Surveys returning invalid JSON
Jan 24, 2017
By
Mike Palmer
We have created several simple one page surveys as a testing ground. On Submit the xAPI Statement JSON is found to be invalid. An example is below. Thank you.
{"object":{"id":"http://65qXj31zAhY_course_id/5VHHvWV5mas/5xUqZmjNzaX/Statement_6SEu92oY22m","definition":{"description":{"und":"As a new team member, this class was very informative to me."},"scale":{"id":"6Xuzs9fGR2z","description":{"und":"Strongly Disagree"}},{"id":"6jlHVNKrZFQ","description":{"und":"Disagree"}},{"id":"5WXUR3VTKKI","description":{"und":"Neutral"}},{"id":"5ZmKBBEW2Os","description":{"und":"Agree"}},{"id":"5tVNsXeC5Yl","description":{"und":"Strongly Agree"}},"interactionType":"likert","name":{"und":"As a new team member, this class was very informative to me."},"type":"http://adlnet.gov/expapi/activities/cmi.interaction"},"objectType":"Activity"},"result":{"response":"5tVNsXeC5Yl"},"verb":{"id":"http://adlnet.gov/expapi/verbs/answered"},"actor":{"mbox":"mailto:someemail@e.com","name":"Mike XapiMan"},"version":"1.0.0","context":{"contextActivities":{"grouping":{"id":"http://65qXj31zAhY_course_id"},"parent":{"id":"http://65qXj31zAhY_course_id/5nI0awE0piX"}},"registration":"MXw5MzF8Mzk2fDc3fDEwOA=="}}
3 Replies
Hi Mike,
Our team would want to take a look at your .story file and the code you've included in addition to how and where you're testing these courses. Can you provide a copy of the file to our Support Engineers here?
I may be under-informed, but at first blush it looks like a simple formatting error in the generated JSON-- shouldn't the
scale
item be an array with multiple sub-objects as peers for the responses? Otherwise the identifier/objects don't pair as valid JSON.Instead, maybe something like this, with
scale
as an array is what was intended:Sorry to chime in again, but the example Storyline-generated JSON structure seems inconsistent with other Likert examples, such as the one found here: <http://tincanapi.com/scorm-to-tin-can-api-cookbook/#pt9> which shows...
So maybe something needs to be fixed on the Storyline side of the equation?
This discussion is closed. You can start a new discussion or contact Articulate Support.