<< Click to Display Table of Contents >> Navigation: The API > API Overview > JSON vs. Simple String |
JSON vs. Simple String
The decision whether you use the JSON API or the Simple API depends on the Client (Controller) you are using and on the programming environment you have.
Both APIs provide the same functionality once the devices are learned in and you use the gateway in normal working mode. However, The JSON API is more powerful but also more complex when it comes to asking the gateway about profiles or connecting directly to a stream of one dedicated device. For a best practice approach to the design of the connection, please refer to the chapter "Client programming".
Comparison between the JSON and the Simple String API
|
JSON API |
Simple String API |
---|---|---|
Application |
HTTP/HTTPS |
TCP Socket Connection |
Security |
TLS 1.2 |
TLS 1.2 |
Content Description |
JSON Strings |
CSV Strings with delimiter "Carriage Return Line Feed" |
Encoding |
UTF-8 |
ISO-8859-1:1998 (Latin-1, West Europe) |
Connection Design |
Two parallel permanent connections; (receive/send) |
one full duplex connection |
Functionality |
•Working Commands •Retrieve Profile Information |
•Working Commands |
Target Clients |
IP Clients with full HTTP Stack and “JSON” libraries •Windows •Unix •MacOs •etc. |
Industrial Controllers i.e. with TCP/IP Stack •Siemens •Crestron •AMX •WAGO •Beckhoff •Loxone •etc… |
Both APIs do not have any limit in the number of parallel connections and are up and running at the same time.