Skip to content

Support the JSON Batch Format #130

Open

Description

@jondequinor

https://github.com/cloudevents/spec/blob/master/json-format.md#4-json-batch-format

Expected Behavior

To be able to use the sdk in order to send a batch of CloudEvent

Actual Behavior

Only the JSON Format is supported by the sdk

Specifications

  • Platform: linux
  • Python Version: 3.6

Activity

  1. grant commented on Dec 10, 2021

    @grant
    Member

    Here's an updated link:

    https://github.com/cloudevents/spec/blob/v1.0.1/json-format.md#4-json-batch-format


    Given the number of providers that give batched events, I'm not sure if the SDKs are going to prioritize this format.

  2. added
    enhancement
    on Jul 9, 2022
  3. EmiRZx commented on Nov 30, 2026

    @EmiRZx

    Is this still wanted for the v2 core? Nothing there handles application/cloudevents-batch+json yet.

    Proposal:

    • JSONFormat.write_batch(events) -> bytes and JSONFormat.read_batch(event_factory, data) -> list[BaseCloudEvent], reusing the per-event logic
    • bindings.http.to_batch(events, event_format) and from_batch(message, event_format, event_factory=None)

    The spec defines a batch format only for JSON, so this would stay on JSONFormat rather than extend the Format protocol. I can open a PR if that works.

  4. PlugaruT commented on Dec 1, 2026

    @PlugaruT
    Member

    @EmiRZx, this is still need for v2. I started to have something for it in #299 but don't have the time to continue the work.

    Feel free to contribute!

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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions