Skip to content

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

Closed
wants to merge 1 commit into from

Conversation

johnnytemp
Copy link

Only supported in folded-scalar (lines ending with | or >) form, or inline form.

Example Yaml:

items

name: !!binary "SGVsbG8sIHdvcmxkLg=="
desc: !!binary |
SGVsbG8sIH
dvcmxkLg==

Only supported in folded-scalar (lines ending with | or >) form, or inline form.

Example Yaml:
items
-
name: !!binary "SGVsbG8sIHdvcmxkLg=="
desc: !!binary |
SGVsbG8sIH
dvcmxkLg==
@fabpot fabpot changed the title Support "!!binary" syntax (decodes base64 string). Previous request: #15958 Support "!!binary" syntax (decodes base64 string) Jan 29, 2016
@fabpot
Copy link
Member

fabpot commented Jan 31, 2016

ping @xabbuh

@@ -21,6 +21,7 @@
*/
class Inline
{
const REGEX_TAG_PATTERN = '((?P<tag>![\w!.\/:-]+) +)?';
Copy link
Member

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.

@xabbuh
Copy link
Member

xabbuh commented Feb 1, 2016

Status: Needs work

@stof
Copy link
Member

stof commented Feb 1, 2016

What about dumping ? Should we detect binary strings and dump them this way too ?

@xabbuh xabbuh added the Yaml label Feb 1, 2016
@johnnytemp
Copy link
Author

Hi all, feel free to edit and merge the changes on your own name. Thank you. :-)

@fabpot
Copy link
Member

fabpot commented Feb 18, 2016

@xabbuh Can you take over this PR?

@xabbuh
Copy link
Member

xabbuh commented Feb 18, 2016

Will do.

@fabpot
Copy link
Member

fabpot commented Feb 19, 2016

Thanks, closing this one then as there is a related linked issue.

@fabpot fabpot closed this Feb 19, 2016
fabpot added a commit that referenced this pull request Feb 28, 2016
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
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.

6 participants