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
When the pulsar broker adds new json fields to certain API calls, like that stats API call, those fields must be explicitly added to the respective structs in this code.
This complicates users being able to see fields in the output until we add explicit support and makes the underlying library out of date.
Solution
By using a library like https://github.com/PerimeterX/marshmallow, we can add an additional extraFields: map[string]interface{} to all the structs and then populate that with any remaining fields from json parsing.
While those fields won't be typed, at the very least can display them and have them exposed. However, we should warn against usage of this as it may break once the fields are added to the top level struct.
The text was updated successfully, but these errors were encountered:
Overview
When the pulsar broker adds new json fields to certain API calls, like that
stats
API call, those fields must be explicitly added to the respective structs in this code.This complicates users being able to see fields in the output until we add explicit support and makes the underlying library out of date.
Solution
By using a library like https://github.com/PerimeterX/marshmallow, we can add an additional
extraFields: map[string]interface{}
to all the structs and then populate that with any remaining fields from json parsing.While those fields won't be typed, at the very least can display them and have them exposed. However, we should warn against usage of this as it may break once the fields are added to the top level struct.
The text was updated successfully, but these errors were encountered: