2.1 Introduction

JSON RPC
JSON (JavaScript Object Notation) is a lightweight format that is used for interchanging data. It is based on a subset of JavaScript language: the way objects are built in JavaScript. JSON uses JSON RPC (REST based) to interact with Event Master processors. JSON-RPC is a remote procedure call protocol encoded in JSON.
Introduction to JSON

JSON is built on two structures:

Example:

{
     "firstName": "John",
     "lastName": "Smith",
     "address": {
         "streetAddress": "21 2nd Street",
         "city": "New York",
         "state": "NY",
         "postalCode": 10021
     },
     "phoneNumbers": [
         "212 555-1234",
         "646 555-4567"
     ]
}
How JSON interacts with Event Master processors

JSON-RPC works by sending a request to a server implementing this protocol. The client in that case is typically software intending to call a single method of a remote system. Multiple input parameters can be passed to the remote method as an array or object, whereas the method itself can return multiple output data as well.

There are JSON RPCs defined to perform tasks on Event Master system. The user needs to send JSON request through their application or open source applications. These applications send requests to the IP address of the Event Master processor with the fixed port ‘9999’.

Note: If there is a master - slave Event Master setup, then JSON commands must be sent to the master unit.