Small typo in example in section 7 of the JSON-RPC 2.0 specification

16 views
Skip to first unread message

Sebastiaan van Erk

unread,
Dec 8, 2011, 4:30:48 AM12/8/11
to json...@googlegroups.com
Hi,

I was adding the examples of the JSON-RPC 2.0 specification as unit
tests to my test suite, and I noticed the following small type:

rpc call Batch (all notifications):

--> [
{"jsonrpc": "2.0", "method": "notify_sum", "params": [1,2,4]},
{"jsonrpc": "2.0", "method": "notify_hello", "params": [7]},
]
<-- //Nothing is returned for all notification batches

The last request in the array has a trailing comma, due to which the
array is not valid JSON and my test fails to parse the batch request.


Best regards,
Sebastiaan

Matt (MPCM)

unread,
Dec 8, 2011, 8:56:46 PM12/8/11
to JSON-RPC
Thank you for pointing this out.

I got bitten by a trailing comma once, in an older version of IE
once... FF didn't complain and it took ages to track down.

--
Matt (MPCM)

Reply all
Reply to author
Forward
0 new messages