Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accept either a Base64 encoded binary or an opaque string in response::IdType #232

Merged
merged 15 commits into from
Apr 23, 2022

Conversation

wravery
Copy link
Contributor

@wravery wravery commented Apr 23, 2022

This is a follow-up/alternative to #229. Instead of making it all or nothing at compile time, individual fields can either return a std::vector<std::uint8_t> (Base64 encoded bytes) or a std::string (opaque string with no encoding) in response::IdType. There's also a new response::Type::ID enum entry, and a Value::maybe_id() method to test if it's safe to call Value::get<IdType>() or Value::release<IdType>().

Since this may require some minor updates to existing code, I bumped the minor version number to 4.2.0.

@wravery wravery merged commit 9afda58 into microsoft:main Apr 23, 2022
@wravery wravery deleted the option-base64-ids branch April 23, 2022 05:20
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.

2 participants