0

I want to read the questions survey from a JSON file not add hardcoded questions in the survey task researchkit

Example JSON file: https://github.com/recoveryrecord/SurveyNative/blob/master/Example/SurveyNative/ExampleQuestions.json

dalton_c
  • 6,876
  • 1
  • 33
  • 42
  • Can you provide an example of what the JSON looks like? – dalton_c Nov 05 '21 at 14:09
  • Like that (https://github.com/recoveryrecord/SurveyNative/blob/master/Example/SurveyNative/ExampleQuestions.json), I have many questions in JSON file & want to add that in survey questions – eslam abotaleb Nov 05 '21 at 14:28
  • Have you tried using the `JSONDecoder` type? What else have you tried? – dalton_c Nov 05 '21 at 14:30
  • I know how to use JSON decoder but I have a problem with ORKQuestion for example if there are 20 questions with different types so I cant add that hardcoded become complicated to read, are you understand me so can find document in the research kit how to create survey questions from json file – eslam abotaleb Nov 05 '21 at 14:33

0 Answers0