Release Summary : New and Updated Features : JSON-RPC 2.0 Interface
 
Share this page          
JSON-RPC 2.0 Interface
The JavaScript Object Notation Remote Procedure Call (JSON-RPC) is an interface OpenROAD can use for data interchange in programming.
The JSON-RPC 2.0 interface to the OpenROAD Server provides external access to 4GL business logic through requests in JSON format from the external interfaces to the OpenROAD Server (COM, DCOM, Java, .NET) and from any languages and tools providing HTTP or HTTPS support, for example JavaScript, PHP, Java, C#, Python, curl, and so on.
JSON-RPC is a JSON-based Remote Procedure Call protocol standard that follows the JSON-RPC 2.0 specification (http://www.jsonrpc.org/specification).
The JSON-RPC 2.0 interface lifts limitations of existing 4GL procedure calls (through Call4GL() or Callproc() methods) to the OpenROAD Server:
4GL procedures called can have a return value.
This value will be represented in the “result” of the response message. Therefore there is no need to wrap such procedures by an SCP with ByRef parameters.
Multiple or circular references are preserved in objects passed as parameters and returned. They will be represented using “$id” and “$ref” meta properties.
Subclass objects or arrays can be passed to parameters of a defined class or array type. This avoids SCP proliferation.
Objects and arrays of system classes can be passed.
Serializable attributes for classes are configurable.
Values may be returned to the caller in different ways (by return value or BYREF parameters).
Batch requests are possible to be passed to the server with one call, providing a JSON array containing request objects. The response will contain an array of response objects.
Language independence is achieved (like the existing XML interface, but without its limitations)
The JSON-RPC interface is less vulnerable to security issues by defining (in a configuration file for each application) the allowed procedures with the parameters allowed in a JSON-RPC request (though the 4GL procedure might actually have more parameters defined), and for each parameter the BYREF usability.
For more information, see JSON-RPC 2.0 Interface in the Server Reference Guide.