Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

faulty answer string with batches that contain requests with and without id's #131

Open
HoMS1987 opened this issue Apr 29, 2022 · 1 comment

Comments

@HoMS1987
Copy link

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.

@Astn
Copy link
Owner

Astn commented Jun 8, 2022

oh good find!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants