-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Support "!!binary" syntax (decodes base64 string) #17599
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
Conversation
Only supported in folded-scalar (lines ending with | or >) form, or inline form. Example Yaml: items - name: !!binary "SGVsbG8sIHdvcmxkLg==" desc: !!binary | SGVsbG8sIH dvcmxkLg==
ping @xabbuh |
@@ -21,6 +21,7 @@ | |||
*/ | |||
class Inline | |||
{ | |||
const REGEX_TAG_PATTERN = '((?P<tag>![\w!.\/:-]+) +)?'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be moved to the Parser
class.
Status: Needs work |
What about dumping ? Should we detect binary strings and dump them this way too ? |
Hi all, feel free to edit and merge the changes on your own name. Thank you. :-) |
@xabbuh Can you take over this PR? |
Will do. |
Thanks, closing this one then as there is a related linked issue. |
This PR was merged into the 3.1-dev branch. Discussion ---------- [Yaml] add support for parsing the !!binary tag | Q | A | ------------- | --- | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #8094, #15587, #17599 | License | MIT | Doc PR | TODO Commits ------- 79a63d5 [Yaml] add support for the !!binary tag
Only supported in folded-scalar (lines ending with | or >) form, or inline form.
Example Yaml:
items
name: !!binary "SGVsbG8sIHdvcmxkLg=="
desc: !!binary |
SGVsbG8sIH
dvcmxkLg==