Skip to content

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

@HoMS1987

Description

@HoMS1987

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions