Detailed examples
UNICOM Intelligence Author example
JSON example
The following JSON example is returned from the Interview Web Service.
{
"Page": {
"URL": "/HOST/api/interviews/ENGINE/tmpMultiDoc/routing/questions/DiaryLoop[{Monday}]",
"Project": "tmpMultiDoc",
"Language": "en-AU",
"Context": "Question",
"LabelType": "Label",
"RoutingContext": "NewRouting",
"LayoutTemplate": "DefaultLayout.htm",
"EstimatedPages": "1",
"Renderer": "HTMLPlayer",
"Locale": "3081",
"Properties": { },
"Title": {
"Text": "DiaryLoop[{Monday}]"
},
"Question": {
"QuestionName": "Monday",
"QuestionFullName": "DiaryLoop[{Monday}]",
"QuestionType": "Block",
"Label": { },
"Question": [
{
"QuestionName": "Meals",
"QuestionFullName": "DiaryLoop[{Monday}].Meals",
"QuestionDataType": "Categorical",
"Label": {
"Text": "Which meals did you eat on Monday?"
},
"Category": [
{
"Name": "Breakfast",
"Label": {
"Text": "Breakfast"
}
},
{
"Name": "Lunch",
"Label": {
"Text": "Lunch"
}
},
{
"Name": "Dinner",
"Label": {
"Text": "Dinner"
}
},
{
"Name": "Snacks",
"Label": {
"Text": "Snacks"
}
}
],
"Validation": {
"MinValue": "1",
"MaxValue": "4"
},
"Response": {
"Value": { }
}
},
{
"QuestionName": "Water",
"QuestionFullName": "DiaryLoop[{Monday}].Water",
"QuestionDataType": "Categorical",
"Label": {
"Text": "How many glasses of water did you drink on Monday?"
},
"Category": [
{
"Name": "_0_",
"Label": {
"Text": "0"
}
},
{
"Name": "_1_to_2",
"Label": {
"Text": "1 to 2"
}
},
{
"Name": "_3_to_4",
"Label": {
"Text": "3 to 4"
}
},
{
"Name": "_5_to_6",
"Label": {
"Text": "5 to 6"
}
},
{
"Name": "_7_to_8",
"Label": {
"Text": "7 to 8"
}
},
{
"Name": "More",
"Label": {
"Text": "More"
}
}
],
"Validation": {
"MinValue": "1",
"MaxValue": "1"
},
"Response": {
"Value": { }
}
},
{
"QuestionName": "OtherDrinks",
"QuestionFullName": "DiaryLoop[{Monday}].OtherDrinks",
"QuestionDataType": "Categorical",
"Label": {
"Text": "What else did you drink on Monday?"
},
"Category": [
{
"Name": "Milk",
"Label": {
"Text": "Milk"
}
},
{
"Name": "Coffee_Tea",
"Label": {
"Text": "Caffeinated drinks"
}
},
{
"Name": "Juice",
"Label": {
"Text": "Juice"
}
},
{
"Name": "Soft_drinks",
"Label": {
"Text": "Soft drinks"
}
},
{
"Name": "Alcoholic_drinks",
"Label": {
"Text": "Alcoholic drinks"
}
}
],
"Validation": {
"MinValue": "1",
"MaxValue": "5"
},
"Response": {
"Value": { }
}
}
]
},
"Navigation": [
{
"Type": "Next",
"IsDefault": "true",
"Label": {
"Text": "Next"
}
},
{
"Type": "Stop",
"Label": {
"Text": "Stop"
}
}
]
}
}
The following JSON example is posted from the client to the server.
{
"Page": {
"URL": "/HOST/api/interviews/ENGINE//routing/questions/DiaryLoop[{Monday}]",
"Question": {
"QuestionName": "Monday",
"Question": [
{
"QuestionName": "Meals",
"Response": {
"Value": "{Breakfast,Dinner}"
}
},
{
"QuestionName": "Water",
"Response": {
"Value": "{_1_to_2}"
}
},
{
"QuestionName": "OtherDrinks",
"Response": {
"Value": "{Milk,Coffee_Tea}"
}
}
]
},
"Navigation": {
"Type": "Next",
"IsSelected": "true"
}
}
}
See also