-
Notifications
You must be signed in to change notification settings - Fork 18
Description
The JSON format is good but I'm thinking we don't want to have to keep rejigging our dataset for other use-cases as it starts to grow. I have a few thoughts.
We could switch the concept of "answers" with the word "responses" because not all the responses are the answer(s). It's just that the word 'answer' implies that it is the correct response.
I know it's hard to come up with a "difficulty" value for questions, but I don't hate the idea of a question difficulty rating so I'm throwing it out there.
I also wonder if it might work better like "correct_responses":[] and "false_responses":[] as lists independently, because then developers could provide more than one correct answer if that's their use-case. Ie. Select all the correct responses instead of select the single correct answer.
I think if developers are using this dataset in their app, they will call an entire chunk of JSON related to a single question and it's responses, a "Question.class" or whatever object they're initialising will probably in itself be a "Question" model. For this reason, the question text should be called "title" or some other distinguishing word. Plus a question like "Select the tallest mountain" isn't technically a question, it's just a statement.
So I guess I'm proposing something like this:
{
"category_id": "Nature",
"source": "http://example.com",
"submitted": 1494700927,
"difficulty": "1",
"en": {
"title": "Select all the animals",
"correct": [
"Cat",
"Cow",
"Chicken"
],
"false": [
"Car",
"Bus",
"Train"
]
},
"fr": {
"title": "Selectez tous les animaux.",
"correct": [
"Chat",
"Vache",
"Poulet"
],
"false": [
"Auto",
"Bus",
"Train"
]
}
}
Finally, I realise we're only starting here but I think we should always anticipate that we will have many languages and the dataset may always grow to have another language. After a while, on my international projects, I notice the top level ends up getting full of languages and I spend a lot of wasted time cycling through keys at the top level. For this reason, I would suggest nesting the language-specific content under another dictionary.
{
"category_id": "Nature",
"source": "http://example.com",
"submitted": 1494700927,
"difficulty": "1",
"languages": {
"en": {
"title": "Select all the animals",
"correct": [
"Cat",
"Cow",
"Chicken"
],
"false": [
"Car",
"Bus",
"Train"
]
},
"fr": {
"title": "Selectez tous les animaux.",
"correct": [
"Chat",
"Vache",
"Poulet"
],
"false": [
"Auto",
"Bus",
"Train"
]
}
}
}