These contracts are published as JSON documents and JSON Schema so they can be consumed from any client platform. This keeps the integration guidance usable for .NET, Java, JavaScript, Python, integration platforms, and other client types.
These contracts are packaged inside a CloudEvent. The CloudEvent envelope carries the event metadata, and the
dataschema attribute points to the payload schema for that event version.
Official CloudEvents references:
For clients, this makes the integration straightforward:
dataschema attribute to discover the payload schema URL.The CloudEvents project provides official SDKs for multiple languages. The examples below focus on the documented access pattern after the CloudEvent has already been decoded by the language SDK; the exact decode helper varies by SDK and transport.
using CloudNative.CloudEvents;
CloudEvent cloudEvent = receivedEvent; // decoded by the CloudEvents SDK
var schemaUrl = cloudEvent.DataSchema?.ToString();
var eventType = cloudEvent.Type;
var payload = cloudEvent.Data;
Console.WriteLine($"{eventType} -> {schemaUrl}");
import { HTTP } from "cloudevents";
const event = HTTP.toEvent({ headers, body });
const schemaUrl = event.dataschema;
const eventType = event.type;
const payload = event.data;
console.log({ eventType, schemaUrl, payload });
from cloudevents.http import from_http
cloud_event = from_http(headers, body)
schema_url = cloud_event.get("dataschema")
event_type = cloud_event.get("type")
payload = cloud_event.data
print(event_type, schema_url, payload)
import io.cloudevents.CloudEvent;
CloudEvent event = receivedEvent; // decoded by the CloudEvents SDK
URI schemaUrl = event.getDataSchema();
String eventType = event.getType();
byte[] payload = event.getData().toBytes();
type and dataschema from the envelope.data using your platform's JSON tooling.Useful references for SDKs and specification details:
The schema catalog is exposed as JSON and can be queried directly:
<baseUrl>/index.json<baseUrl>/{domain}/index.jsonschemaPath value in the domain catalogA typical client flow is:
Some clients can work directly from the JSON schema URL instead of generating strongly typed classes first. In that flow, the client downloads the schema, reads the event metadata, and parses the event payload as JSON at runtime.
This is useful when you want to:
Using JSON keeps the contract portable and avoids coupling consumers to a specific runtime or build toolchain.
The section below lists the published contract catalog for available domains. Use it to browse available events, compare schema versions, and open the payload schema linked to each CloudEvent.