Skip to content

Added support for custom JSON configuration in the forwarder component#667

Merged
m110 merged 3 commits into
ThreeDotsLabs:masterfrom
falboe:feat/forwarder-custom-json
May 13, 2026
Merged

Added support for custom JSON configuration in the forwarder component#667
m110 merged 3 commits into
ThreeDotsLabs:masterfrom
falboe:feat/forwarder-custom-json

Conversation

@falboe

@falboe falboe commented Feb 3, 2026

Copy link
Copy Markdown
Contributor

This pull request introduces the ability to inject a custom JSON marshal/unmarshal implementation into the Forwarder component.

This makes the component more flexible and allows consumers to use alternative JSON libraries (e.g. Sonic) instead of being tightly coupled to the standard encoding/json package.

@m110

m110 commented May 13, 2026

Copy link
Copy Markdown
Member

Thanks for contributing @falboe! I extended the interface a bit to be consistent with how other configs work. :)

Replace the separate Config.Unmarshal / PublisherConfig.Marshal function
fields with a single forwarder.Marshaler interface and a DefaultMarshaler
implementation backed by encoding/json. The interface mirrors the
encoding/json API so drop-in alternatives (sonic, goccy/go-json, …) only
need a thin wrapper.
@m110 m110 force-pushed the feat/forwarder-custom-json branch from a6b2b13 to 9867a04 Compare May 13, 2026 18:02
@m110 m110 merged commit a08a994 into ThreeDotsLabs:master May 13, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants