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
{{ message }}
Repository navigation
Return structured data instead of JSON string for extension fields #4
We suggest improving how the library returns data intended for insertion into extension fields. Currently, the library returns a JSON blob as a string, which introduces unnecessary overhead for consumers.
Problem
At the moment, extension data is returned as a JSON string. To access specific fields (e.g., treatment group for Amazon reporting), consumers must:
Unmarshal the JSON string into a struct/map
Extract the required fields
This adds extra CPU overhead and allocations, especially in high-throughput systems where this operation happens frequently.
Impact
Increased marshaling/unmarshaling overhead
latency in hot paths
Higher CPU and memory usage under load
Expected behavior
The library should return structured data directly, allowing consumers to access fields without additional decoding.
Suggestion
Instead of returning a JSON string, consider returning:
a map[string]interface{} or
a well-defined struct representing the extension schema
#1 is an attempt to address this issue on the Java implementation side. We haven't gotten to the reporting bits, yet, but should apply to that as well.
Activity
drstevens commentedon Apr 28, 2026
#1 is an attempt to address this issue on the Java implementation side. We haven't gotten to the reporting bits, yet, but should apply to that as well.