JSON-RPC - Update to 2.0?

Can/will the implementation of JSON-RPC in the ROSDK be updated to the official 2.0 version?

The current implementation is JSON-RPC 1.1, which was the working draft. The problem I have with the current 1.1 spec is that the id property of the Response object was optional. In JSON-RPC 2.0, it is a required member of the Response object.

Currently, the ROSDK JSON message (TROJSONMessage) returns the id property of the Response object only if one sets the JSON message property SessionIdAsId = TRUE. However, with SessionIDAsID set to TRUE, it is the RO-assigned client session ID (a GUID) that is returned in the Response object. It is possible to assign an id from the client via the Request object, but since SessionIDAsID is set to TRUE, the format must be a GUID, otherwise an error is raised.

The JSON message format implemented by the ROSDK should, as part of the Response object, return the id assigned by the Client in the Request object, without having TROJSONMessage.SessionIDAsID = True.

I should add that this mostly affects non RO clients using JSON-RPC against a RO server/service.

Recent edits for clarification

1 Like

Hello!

Thanks for pointing this out. We are logging this for implementation, can’t provide time estimation right now.
Meanwhile as you have said, the only way seems to be using guid value as id.

Hi there,

what is the status? Is the JSON-RPC 2.0 supported?

Best regards!