Section 1.2 of the JSON-RPC 1.0 specification says, "result - The Object that was returned by the invoked method. This must be null in case there was an error invoking the method."
This suggests that the result should be either an Object or null
. However, the examples in Section 4 show results that are Strings or Numbers.
I presume that the spec authors intended for all types (including Arrays) to be allowed, and that Section 1.2 is written wrongly. Is there an authoritative source that can confirm or refute this?
(Side note: The v2.0 specs are better, albeit still a bit ambiguous. Section 5 simply says "The value of this [result] member is determined by the method invoked on the Server" but at least the examples do show an Array as a result)