Skip to content

Conversation

davidh44
Copy link
Contributor

Motivation and Context

Provide optimizations for EnhancedDocument.toJson()

Modifications

When escaping characters, check that escaping is actually needed before entering switch flow. Else, skip the switch flow and append the char as-is to the StringBuilder.
If no characters need escaping, return input String as-is without initializing StringBuilder

Testing

Current unit tests for escape characters pass

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

@davidh44 davidh44 requested a review from a team as a code owner September 25, 2025 18:21
@davidh44 davidh44 added the no-api-surface-area-change Indicate there is no API surface area change and thus API surface area review is not required label Sep 25, 2025
Copy link

@davidh44 davidh44 added this pull request to the merge queue Sep 25, 2025
Merged via the queue into master with commit d4f31f2 Sep 25, 2025
50 of 51 checks passed
Copy link

This pull request has been closed and the conversation has been locked. Comments on closed PRs are hard for our team to see. If you need more assistance, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 25, 2025
@davidh44 davidh44 deleted the hdavidh/ddb-enhanced-doc-toJson-optimization branch September 25, 2025 21:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
no-api-surface-area-change Indicate there is no API surface area change and thus API surface area review is not required
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants