JSON Template

JSON stands for JavaScript Object Notation which is a lightweight data-interchange format popularised by Douglas Crockford.

ChemGym Flashcards stores the question and answer for all of its flashcards in a single JSON file along with details of which specifications and topics each flashcard is relevant for.

The JSON template file that you can get from the contributions page contains several example flashcards to show how they need to be formatted.

JSON is very particular about its formatting. One missing comma or mis-placed bracket can prevent a file from loading successfully.

Fortunately, there are a number of tools available to check the validity of a JSON file.

Probably the easiest one to use is the JSONLint web site although other tools that can be run locally may be preferable if you find yourself needing to validate a lot of JSON and you know how to use node.js.

Each flashcard in ChemGym Flashcards needs four things.

  • A unique code to identify it.
  • A question.
  • An answer.
  • A list of Topic Codes for which the flashcard is relevant.
  • You do not need to supply a unique code as I will provide one if your flashcard is added to ChemGym Flashcards, but you may use this field for your convenience if this is helpful.

    A question can have one line or multiple lines - see the template file for examples.

    An answer can have one line or multiple lines - see the template file for examples.

    You only need to provide one Topic Code for the specification you use. I will add others later if the flashcard is used.

    If you find the JSON format too hard to use, please still consider contributing your flashcards as I may be able to convert them into a usable format anyway.

    It is much more important that the chemical content of the flashcards is good. The technicalities can be dealt with later.

    If you do have time to contribute some flashcards, please send them via email to support at chemgym.net.

    I look forward to hearing from you.

    Dr Michael Docker