@@ -16,7 +16,7 @@ processEvaluate[jsonData_] := Module[{result, requestData, answer, response, par
1616 Print ["Evaluating Response Against Answer" ];
1717 result = EvaluationFunction [type , answer , response , params ];
1818 Print ["Output: " , result ];
19- result
19+ < | "command" -> "eval" , " result" -> result | >
2020]
2121
2222processPreview [jsonData_ ] := Module [{result , requestData , response },
@@ -27,19 +27,19 @@ processPreview[jsonData_] := Module[{result, requestData, response},
2727
2828 result = PreviewFunction [response ];
2929 Print ["Result: " , result ];
30- result
30+ < | "command" -> "preview" , " result" -> result | >
3131]
3232
3333evalQuestionIO = Function [
34- Module [{jsonData , command , resultAssoc },
34+ Module [{jsonData , command , resultAssoc , response },
3535 jsonData = Import [#1 , "JSON" ] //. List :> Association ;
3636 command = jsonData ["method" ];
3737
38- resultAssoc = ExportForm [ Which [
38+ resultAssoc = Which [
3939 command == "eval" , processEvaluate [jsonData ],
4040 command == "preview" , processPreview [jsonData ],
4141 True , "Incorrect command"
42- ]] ;
42+ ];
4343
4444 Print ["Outputted JSON" ];
4545 Print [resultAssoc ];
0 commit comments