Skip to content

Add ensure_ascii option #1689

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add ensure_ascii option #1689

wants to merge 1 commit into from

Conversation

Viicos
Copy link
Member

@Viicos Viicos commented Apr 11, 2025

Change Summary

Part of pydantic/pydantic#11202.

Related issue number

Checklist

  • Unit tests for the changes exist
  • Documentation reflects the changes where applicable
  • Pydantic tests pass with this pydantic-core (except for expected changes)
  • My PR is ready to review, please add a comment including the phrase "please review" to assign reviewers

}
}

macro_rules! defer {
Copy link
Member Author

Choose a reason for hiding this comment

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

As per @cetra3's suggestion. The match statement in to_json_bytes isn't going to scale well, so maybe an alternative API should be used in the future.

Copy link

codspeed-hq bot commented Apr 11, 2025

CodSpeed Performance Report

Merging #1689 will not alter performance

Comparing ensure-ascii (27a843b) with main (9a25aa6)

Summary

✅ 157 untouched benchmarks

};
}

#[allow(clippy::needless_lifetimes)]
Copy link
Member Author

Choose a reason for hiding this comment

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

Looks like a false positive from Clippy? There are already a bunch.

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.

1 participant