Skip to content

Single response when sending batch request. #140

Closed

Description

@hovi

When I send multiple request in batch array, I get correctly results. When I send single request, I get the result without array brackets. The specification is a bit confusing, but I expect this is incorrect. It is certainly breaking my client expectations :-D Some examples follow.

Correct with 2 requests:

Request

[{"id":1849316922322121888,"jsonrpc":"2.0","method":"Observer.SwitchCamera","params":{}},{"id":732138300415643188,"jsonrpc":"2.0","method":"Observer.SwitchCamera","params":{}}]

Response
[{"jsonrpc":"2.0","result":null,"id":1849316922322121888},{"jsonrpc":"2.0","result":null,"id":732138300415643188}]



Request
[{"id":2419378167359262235,"jsonrpc":"2.0","method":"Observer.SwitchCamera","params":{}}]

Response missing array brackets
{"jsonrpc":"2.0","result":null,"id":2419378167359262235}


Activity

  1. Astn commented on Mar 13, 2024

    @Astn
    Owner

    Ahh, good find. Did you already make a fix?

  2. hovi commented on Mar 19, 2024

    @hovi
    Author

    Nah sorry, I don't have .NET setup anymore and did workaround on my client side.

  3. Astn commented on Sep 24, 2026

    @Astn
    Owner

    Landed on master in #148 (merge commit 773289b), released as 2.0.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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