When implementing the JSONRPC 2.0 server, support for both nominal and positional arguments is required?

According to the specification here: http://groups.google.com/group/json-rpc/web/json-rpc-2-0

more specifically, this section:

If present, the parameters for the rpc call MUST be provided as a structured value. Either position through an Array or name-name through an object.

It seems obvious to me that both styles should be supported, however, I filed a bug report, and the other developer believes that the developers should decide which method to support, and that both are not required for the specification.

I can not find the official answer, except that I quoted above that the other developer does not interpret in the same way as I do.

So what is the general consensus?

+3
source share
2 answers

I completely agree, this is clearly indicated in the above documentation. The word “should” in sentence 4.2 requires “structured meaning”. The “structured value" is later defined by the second sentence. To ignore one option, it would be to change the definition of "structured value", which is a violation of the JSON-RPC 2.0 specification

  • If present, the parameters for the rpc call MUST be represented as a structured value.
  • Either by position through an array or by name through an object.
+2
source

By joining your side, and I did not think that this could be controversial.

+1
source

Source: https://habr.com/ru/post/1781338/


All Articles