How to write into a JSON file via input-box?

esp. if you make a data file used in another system ( computer or program )
your database structure should be good.

++ your start with the first JSON object including a array using good descriptors
? sorry i not know the correct name for a field like “universe” ?
( JSON has its own wording i think )
already.
still any program using this ( incl. the processing program we talk about here )
would need to have the question text “Give the size of the universe” hardcoded
and the other system, reading the answers, would not know the questions!!

also what i mentioned already,
to have the user answers in one field and the correct answers
like for

  • atmosphere ?==? oxygen
  • gravity ?==? 2.4

in a second field makes sense.
here an example to check and score on that: ( score is a database field too ! )

    int newscore = 0;
    if ( question.getString("q1user").equals( question.getString("q1check") ) ) newscore++;
    if ( question.getFloat("q2user") == question.getFloat("q2check") ) newscore++;
    question.setInt("score",newscore);