You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: add market-data-unwrap example to documentation
- Add market-data-unwrap to examples README with feature matrix
- Reference issue #86 in json-protobuf-compatibility guide
Co-Authored-By: Claude Opus 4.5 <[email protected]>
|**[market-data-unwrap](../../examples/market-data-unwrap/)**| Financial market data API | Unwrap annotation for map values, JSON/protobuf compatibility |
30
31
31
32
---
32
33
@@ -98,6 +99,29 @@ cd examples/multi-service-api && make demo
98
99
- Service-level headers applied to all methods
99
100
- Method-level headers for specific operations (X-Confirm-Delete, X-Audit-Reason)
100
101
102
+
### market-data-unwrap
103
+
Financial market data API demonstrating the `unwrap` annotation.
104
+
-`(sebuf.http.unwrap)` annotation for cleaner JSON serialization
105
+
- Map values serialized as arrays instead of wrapped objects
106
+
- Real-world pattern from APIs like Alpaca Market Data
107
+
108
+
```bash
109
+
cd examples/market-data-unwrap && make run # Start server
110
+
cd examples/market-data-unwrap && make client # Run client example
Copy file name to clipboardExpand all lines: docs/json-protobuf-compatibility.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,8 @@
4
4
5
5
Protobuf and JSON have different type systems and serialization behaviors. While sebuf handles most conversions automatically, some patterns require explicit annotations to produce the expected JSON output. This guide covers these edge cases and how to address them.
6
6
7
+
> **Note**: The `unwrap` annotation was added to address [issue #86](https://github.com/SebastienMelki/sebuf/issues/86) - supporting unwrapped repeated fields in map values for JSON marshaling.
0 commit comments