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

Use yaml's !!binary string for strings as necessary #22298

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

SeanCurtis-TRI
Copy link
Contributor

@SeanCurtis-TRI SeanCurtis-TRI commented Dec 11, 2024

When a string has non-printable characters, the string automatically gets
encoded in YAML's binary encoding.


This change is Reviewable

Serializable structs can now have members that are either
std::filesystem::path (or pathlib.Path) or drake::FileSource.

The FileSource support is limited. FileSource is a variant containing
either a std::filesystem::path or MemoryFile. If it contains a path
(its default configuration), serialization is fine. If it contains a
MemoryFile it throws. The throwing behavior will be updated later when
we've decided what we're going to do about bytestrings and the !!binary
yaml tag.
When a string has non-printable characters, the string automatically gets
encoded in YAML's binary encoding.
Copy link
Contributor Author

@SeanCurtis-TRI SeanCurtis-TRI left a comment

Choose a reason for hiding this comment

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

@jwnimmer-tri Here's the alternative.

Ignore revision 1, it's simply #22288. R2 contains the byte string specific stuff.

Reviewable status: needs platform reviewer assigned, needs at least two assigned reviewers, commits need curation (https://drake.mit.edu/reviewable.html#curated-commits), missing label for release notes (waiting on @SeanCurtis-TRI)

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.

2 participants