10000 Documented how to parse and dump custom YAML tags by javiereguiluz · Pull Request #9212 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

Documented how to parse and dump custom YAML tags #9212

8000 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 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Align code
  • Loading branch information
javiereguiluz committed Feb 7, 2018
commit 2758a3a7227be96c67d916b92ded6c547fa855a6
2 changes: 1 addition & 1 deletion components/yaml.rst
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ In addition to the built-in support of tags like ``!php/const`` and
$data = "!my_tag { foo: bar }";
$parsed = Yaml::parse($data, Yaml::PARSE_CUSTOM_TAGS);
// $parsed = Symfony\Component\Yaml\Tag\TaggedValue('my_tag', array('foo' => 'bar'));
$tagName = $parsed->getTag(); // $tagName = 'my_tag'
$tagName = $parsed->getTag(); // $tagName = 'my_tag'
$tagValue = $parsed->getValue(); // $tagValue = array('foo' => 'bar')

If the contents to dump contain :class:`Symfony\\Component\\Yaml\\Tag\\TaggedValue`
Expand Down
0