Skip to content

Commit 8c5dfb9

Browse files
Add JSON over gRPC support (#8)
* Initial commit - JSON support Signed-off-by: teodordelibasic-db <[email protected]> * Add tests Signed-off-by: teodordelibasic-db <[email protected]> * Update examples Signed-off-by: teodordelibasic-db <[email protected]> * Update README Signed-off-by: teodordelibasic-db <[email protected]> * Update NEXT_CHANGELOG.md Signed-off-by: teodordelibasic-db <[email protected]> * Update README.md Signed-off-by: teodordelibasic-db <[email protected]> * Update examples Signed-off-by: teodordelibasic-db <[email protected]> * Fix formatting Signed-off-by: teodordelibasic-db <[email protected]> * Rebase and improve wording Signed-off-by: teodordelibasic-db <[email protected]> --------- Signed-off-by: teodordelibasic-db <[email protected]>
1 parent 6d230c1 commit 8c5dfb9

File tree

13 files changed

+1277
-217
lines changed

13 files changed

+1277
-217
lines changed

NEXT_CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,31 @@
55
### New Features and Improvements
66

77
- Loosened protobuf dependency constraint to support versions >= 4.25.0 and < 7.0
8+
- **JSON Serialization Support**: Added support for JSON record serialization alongside Protocol Buffers (default)
9+
- New `RecordType.JSON` mode for ingesting JSON-encoded strings
10+
- No protobuf schema compilation required
811
- Added `HeadersProvider` abstraction for flexible authentication strategies
912
- Implemented `OAuthHeadersProvider` for OAuth 2.0 Client Credentials flow (default authentication method used by `create_stream()`)
1013

1114
### Bug Fixes
1215

1316
### Documentation
1417

18+
- Added JSON and protobuf serialization examples for both sync and async APIs
19+
- Restructured Quick Start guide to present JSON first as the simpler option
20+
- Enhanced API Reference with JSON mode documentation
1521
- Added Azure workspace and endpoint URL examples
1622

1723
### Internal Changes
1824

1925
### API Changes
2026

27+
- **StreamConfigurationOptions**: Added `record_type` parameter to specify serialization format
28+
- `RecordType.PROTO` (default): For protobuf serialization
29+
- `RecordType.JSON`: For JSON serialization
30+
- Example: `StreamConfigurationOptions(record_type=RecordType.JSON)`
31+
- **ZerobusStream.ingest_record**: Now accepts JSON strings (when using `RecordType.JSON`) in addition to protobuf messages and bytes
32+
- Added `RecordType` enum with `PROTO` and `JSON` values
2133
- Added `HeadersProvider` abstract base class for custom header strategies
2234
- Added `OAuthHeadersProvider` class for OAuth 2.0 authentication with Databricks OIDC endpoint
2335
- Added `create_stream_with_headers_provider` method to `ZerobusSdk` and `aio.ZerobusSdk` for custom authentication header providers

0 commit comments

Comments
 (0)