{
    "content": [
        {
            "type": "text",
            "text": "# YAML::Node (perldoc)\n\n## NAME\n\nYAML::Node - A generic data node that encapsulates YAML information\n\n## SYNOPSIS\n\nuse YAML;\nuse YAML::Node;\nmy $ynode = YAML::Node->new({}, 'ingerson.com/fruit');\n%$ynode = qw(orange orange apple red grape green);\nprint Dump $ynode;\nyields:\n--- !ingerson.com/fruit\norange: orange\napple: red\ngrape: green\n\n## DESCRIPTION\n\nA generic node in YAML is similar to a plain hash, array, or scalar node in Perl except that it\nmust also keep track of its type. The type is a URI called the YAML type tag.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION** (1 subsections)\n- **AUTHOR**\n- **COPYRIGHT**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "YAML::Node",
        "section": "",
        "mode": "perldoc",
        "summary": "YAML::Node - A generic data node that encapsulates YAML information",
        "synopsis": "use YAML;\nuse YAML::Node;\nmy $ynode = YAML::Node->new({}, 'ingerson.com/fruit');\n%$ynode = qw(orange orange apple red grape green);\nprint Dump $ynode;\nyields:\n--- !ingerson.com/fruit\norange: orange\napple: red\ngrape: green",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 14,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 20,
                "subsections": [
                    {
                        "name": "keys",
                        "lines": 21
                    }
                ]
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 7,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "YAML::Node - A generic data node that encapsulates YAML information\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use YAML;\nuse YAML::Node;\n\nmy $ynode = YAML::Node->new({}, 'ingerson.com/fruit');\n%$ynode = qw(orange orange apple red grape green);\nprint Dump $ynode;\n\nyields:\n\n--- !ingerson.com/fruit\norange: orange\napple: red\ngrape: green\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "A generic node in YAML is similar to a plain hash, array, or scalar node in Perl except that it\nmust also keep track of its type. The type is a URI called the YAML type tag.\n\nYAML::Node is a class for generating and manipulating these containers. A YAML node (or ynode)\nis a tied hash, array or scalar. In most ways it behaves just like the plain thing. But you can\nassign and retrieve and YAML type tag URI to it. For the hash flavor, you can also assign the\norder that the keys will be retrieved in. By default a ynode will offer its keys in the same\norder that they were assigned.\n\nYAML::Node has a class method call new() that will return a ynode. You pass it a regular node\nand an optional type tag. After that you can use it like a normal Perl node, but when you\nYAML::Dump it, the magical properties will be honored.\n\nThis is how you can control the sort order of hash keys during a YAML serialization. By default,\nYAML sorts keys alphabetically. But notice in the above example that the keys were Dumped in the\nsame order they were assigned.\n\nYAML::Node exports a function called ynode(). This function returns the tied object so that you\ncan call special methods on it like ->keys().\n",
                "subsections": [
                    {
                        "name": "keys",
                        "content": "use YAML;\nuse YAML::Node;\n\n%$node = qw(orange orange apple red grape green);\n$ynode = YAML::Node->new($node);\nynode($ynode)->keys(['grape', 'apple']);\nprint Dump $ynode;\n\nproduces:\n\n---\ngrape: green\napple: red\n\nIt tells the ynode which keys and what order to use.\n\nynodes will play a very important role in how programs use YAML. They are the foundation of how\na Perl class can marshall the Loading and Dumping of its objects.\n\nThe upcoming versions of YAML.pm will have much more information on this.\n"
                    }
                ]
            },
            "AUTHOR": {
                "content": "Ingy döt Net <ingy@cpan.org>\n",
                "subsections": []
            },
            "COPYRIGHT": {
                "content": "Copyright 2001-2014. Ingy döt Net\n\nThis program is free software; you can redistribute it and/or modify it under the same terms as\nPerl itself.\n\nSee <http://www.perl.com/perl/misc/Artistic.html>\n",
                "subsections": []
            }
        }
    }
}