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

[Internal] Binary Encoding: Adds Support for User String Encoding #5036

Open
wants to merge 20 commits into
base: master
Choose a base branch
from

Conversation

Maya-Painter
Copy link
Contributor

@Maya-Painter Maya-Painter commented Feb 27, 2025

Description

Adds support for reading and writing user string encoded binary data in JsonReader, JsonWriter, and JsonNavigator.

Note: This is being introduced to support an internal scenario. For now, user string encoded data will NOT be sent over the wire to the client.

Type of change

  • New feature (non-breaking change which adds functionality)

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good!

@Maya-Painter Maya-Painter changed the title [Internal] Binary Encoding: Add Support for User String Encoding [Internal] Binary Encoding: Adds Support for User String Encoding Feb 27, 2025
@Maya-Painter Maya-Painter requested a review from Pilchie as a code owner March 20, 2025 18:45
return false;
}

return this.checksum == other.checksum;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this.checksum == other.checksum

Is this sufficient? Do we not need deep comparison?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The checksum is generated by hashing each incoming string with the previous hash as the seed. If the checksums are the same the dictionaries will definitely contain the same strings in the same order.

adityasa
adityasa previously approved these changes Mar 21, 2025
Copy link
Contributor

@adityasa adityasa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

{
bool TryGetString(int index, out UtfAllString value);

bool TryGetIndex(Utf8Span value, out int index);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TryGetIndex

Is this supposed to be TryGetStringId?

Copy link
Contributor Author

@Maya-Painter Maya-Painter Mar 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a matching TryGetIndex function in the BE

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