Skip to content

Conversation

@DariusIMP
Copy link
Member

On the Rust API we allow users to directly pass a payload as a string. This PR introduces that functionality to the Java API by providing function overloads that accept String parameters for payloads.

Example:
Instead of having to do like

session.put(keyExpr, ZBytes.from("Example"));

now users can directly do

session.put(keyExpr, "Example");

This applies to all the functions that expect some ZBytes parameter.

Allowing users to directly pass a String param to functions expecting ZBytes, instead of making them create a ZBytes instance from the String through ZBytes.from(string)
@DariusIMP DariusIMP requested a review from milyin January 8, 2025 16:03
@DariusIMP DariusIMP added enhancement New feature or request release Part of the next release labels Jan 8, 2025
@milyin milyin merged commit 7b2bbfa into eclipse-zenoh:main Jan 15, 2025
7 of 10 checks passed
@DariusIMP DariusIMP deleted the string_overloads branch January 16, 2025 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request release Part of the next release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants