Skip to content

feat(sdk): add parseEncodingsJson helper for plugins#31

Merged
pabloinigoblasco merged 1 commit into
developmentfrom
fix/encoding-utils-helper
Apr 4, 2026
Merged

feat(sdk): add parseEncodingsJson helper for plugins#31
pabloinigoblasco merged 1 commit into
developmentfrom
fix/encoding-utils-helper

Conversation

@pabloinigoblasco
Copy link
Copy Markdown
Collaborator

Summary

  • Add encoding_utils.hpp in pj_plugins/sdk/ with parseEncodingsJson() helper
  • Converts JSON array from runtimeHost().listAvailableEncodings() to std::vector<std::string>
  • Keeps JSON parsing dependencies out of pj_base

Why

Plugins (MQTT, ZMQ) need to populate encoding combos dynamically. The SDK returns JSON, plugins need a vector. This helper avoids duplicating parsing logic in each plugin.

Test plan

  • Compiles with MQTT and ZMQ plugins locally
  • CI passes after plugins PR uses this helper

Add encoding_utils.hpp in pj_plugins/sdk/ with parseEncodingsJson() helper
that converts the JSON array from runtimeHost().listAvailableEncodings()
into std::vector<std::string>.

This keeps JSON parsing dependencies (nlohmann/json) out of pj_base while
providing a convenient helper for plugins that need dynamic encoding lists.

Contents:
- New pj_plugins/sdk/encoding_utils.hpp with PJ::sdk::parseEncodingsJson()
- Updated SDK docs to reference the helper
@pabloinigoblasco pabloinigoblasco merged commit 3daf064 into development Apr 4, 2026
2 checks passed
@pabloinigoblasco pabloinigoblasco deleted the fix/encoding-utils-helper branch May 4, 2026 12:35
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.

1 participant