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

[DynamicJson] Change delimiter used by changelist #35020

Merged
merged 2 commits into from
Mar 22, 2023

Conversation

annelo-msft
Copy link
Member

@annelo-msft annelo-msft commented Mar 20, 2023

Before this PR, we used a . character as a delimiter, however it is a valid character to use in a JSON property name, and as a result, if properties were present that had dots in the name, it could break serialization.

By moving to an unescaped unicode control character as a delimiter, we're now keying changes on property names that are invalid JSON strings and therefore invalid JSON. The benefit is that the BCL JsonReader will validate the JSON for us when we call JsonDocument.Parse() to ensure that we can't be working with JSON strings where our delimiter could appear.

Many thanks to @bterlson for the Unicode/JSON consultation!

Contributes to #33856

@azure-sdk
Copy link
Collaborator

API change check

API changes are not detected in this pull request.

@jsquire
Copy link
Member

jsquire commented Mar 22, 2023

unescaped unicode control character as a delimiter,

Clever!

@annelo-msft annelo-msft merged commit 4479b95 into Azure:main Mar 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants