JSON format
Each command that the user sends to the controller and each message that the controller sends to the user is a string in JSON format. The general format of a command / message is as the following:
{"key1" : value1, "key2" : value2, ... , "keyn": valuen}
where string "keyi"
is the name of the i-th parameter and valuei
is its value.
Notice that the order in which key, value pairs are presented in the command or message is not important.
All strings that appear inside a command, should only be in all lower case letters.
Each command that is sent to the controller has a required "cmd"
field which specifies the name of the command. Each command can have an optional "id"
field with a positive integer value. The id is used to follow the status of the command throughout its lifetime by the messages that are returned from the controller with the same id value.
In the sections that follow, we will describe the set of messages and commands and their corresponding key value pairs.