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

Respect !!str tag for structpb unmarshal #50

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

Conversation

fvallenilla
Copy link

I observed that when a structpb.Value_StringValue can be parsed as a number it does not roundtrip through protoyaml.

This commit adds some failing test cases to TestValue_Dynamic and updates unmarshalScalarString to return a Value_StringValue if the !!str tag is present.

Let me know if I'm missing something, I'm new to working with YAML!

I observed that structpb string values that can be parsed as an int do
not roundtrip through protoyaml.

This commit adds some failing test cases to TestValue_Dynamic and
updates unmarshalScalarString to return a StringValue if the !!str tag
is present.
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@fvallenilla
Copy link
Author

Let me know if this change seems reasonable, if so I can look into sorting out the CLA situation

@Alfus
Copy link
Contributor

Alfus commented Dec 17, 2024

This looks good to me.

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