JSON-RPC.NET
JSON-RPC.NET copied to clipboard
faulty answer string with batches that contain requests with and without id's
When I process a JSON request batch, for example:
[{"jsonrpc":"2.0","method":"NewMeasureValues","params":{"Values":[{"Timestamp": null, "Mass":1},{"Timestamp": "2022-04-29T09:51:15.1961814Z", "Mass":2}]},"id":32},{"jsonrpc":"2.0","method":"NewMeasureValues","params":{"Values":[{"Timestamp": null, "Mass":1},{"Timestamp": "2022-04-29T09:51:15.1961814Z", "Mass":2}]}}]
where the first request in the batch has an id and the second doesn't, the answer string I get with
JsonRpcProcessor.Process(receivedJsonString, this)
is an empty string. When it is the other way around, i get the following answer string:
{"jsonrpc":"2.0","result":null,"id":32}]
There the "[" at the beginning is missing.
What I would expect as answer would be:
[{"jsonrpc":"2.0","result":null,"id":32}]
in both cases.
oh good find!