{
    "content": [
        {
            "type": "text",
            "text": "# YAML::XS (perldoc)\n\n## NAME\n\nYAML::XS - Perl YAML Serialization using XS and libyaml\n\n## SYNOPSIS\n\nuse YAML::XS;\nmy $yaml = Dump [ 1..4 ];\nmy $array = Load $yaml;\n\n## DESCRIPTION\n\nKirill Simonov's \"libyaml\" is arguably the best YAML implementation. The C library is written\nprecisely to the YAML 1.1 specification. It was originally bound to Python and was later bound\nto Ruby.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **CONFIGURATION**\n- **LIBYAML**\n- **SEE ALSO**\n- **AUTHOR**\n- **COPYRIGHT AND LICENSE**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "YAML::XS",
        "section": "",
        "mode": "perldoc",
        "summary": "YAML::XS - Perl YAML Serialization using XS and libyaml",
        "synopsis": "use YAML::XS;\nmy $yaml = Dump [ 1..4 ];\nmy $array = Load $yaml;",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 10,
                "subsections": []
            },
            {
                "name": "CONFIGURATION",
                "lines": 83,
                "subsections": []
            },
            {
                "name": "LIBYAML",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 10,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "COPYRIGHT AND LICENSE",
                "lines": 7,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "YAML::XS - Perl YAML Serialization using XS and libyaml\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use YAML::XS;\n\nmy $yaml = Dump [ 1..4 ];\nmy $array = Load $yaml;\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Kirill Simonov's \"libyaml\" is arguably the best YAML implementation. The C library is written\nprecisely to the YAML 1.1 specification. It was originally bound to Python and was later bound\nto Ruby.\n\nThis module is a Perl XS binding to libyaml which offers Perl the best YAML support to date.\n\nThis module exports the functions \"Dump\", \"Load\", \"DumpFile\" and \"LoadFile\". These functions are\nintended to work exactly like \"YAML.pm\"'s corresponding functions. Only \"Load\" and \"Dump\" are\nexported by default.\n",
                "subsections": []
            },
            "CONFIGURATION": {
                "content": "$YAML::XS::LoadBlessed (since v0.69)\nDefault: false.\n\nThe default was changed in version 0.81.\n\nWhen set to false, it will not bless data into objects, which can be a security problem,\nwhen loading YAML from an untrusted source. It will silently ignore the tag and just load\nthe data unblessed.\n\nIn PyYAML, this is called SafeLoad.\n\nIf set to true, it will load the following YAML as objects:\n\n---\nlocal: !Foo::Bar [a]\nperl: !!perl/hash:Foo::Bar { a: 1 }\nregex: !!perl/regexp:Foo::Bar pattern\n\nYou can create any kind of object with YAML. The creation itself is not the critical part.\nIf the class has a \"DESTROY\" method, it will be called once the object is deleted. An\nexample with File::Temp removing files can be found at\n<https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=862373>\n\n$YAML::XS::UseCode\n$YAML::XS::DumpCode\n$YAML::XS::LoadCode\nIf enabled supports deparsing and evaling of code blocks.\n\nNote that support for loading code was added in version 0.75, although $LoadCode was\ndocumented already in earlier versions.\n\n$YAML::XS::QuoteNumericStrings\nWhen true (the default) strings that look like numbers but have not been numified will be\nquoted when dumping.\n\nThis ensures leading that things like leading zeros and other formatting are preserved.\n\n$YAML::XS::Boolean (since v0.67)\nDefault is undef.\n\nWhen set to \"JSON::PP\" or \"boolean\", the plain (unquoted) strings \"true\" and \"false\" will be\nloaded as \"JSON::PP::Boolean\" or \"boolean.pm\" objects. Those objects will be dumped again as\nplain \"true\" or \"false\".\n\nIt will try to load JSON::PP or boolean and die if it can't be loaded.\n\nWith that it's possible to add new \"real\" booleans to a data structure:\n\nlocal $YAML::XS::Boolean = \"JSON::PP\"; # or \"boolean\"\nmy $data = Load(\"booltrue: true\");\n$data->{boolfalse} = JSON::PP::false;\nmy $yaml = Dump($data);\n# boolfalse: false\n# booltrue: true\n\nIt also lets booleans survive when loading YAML via YAML::XS and encode it in JSON via one\nof the various JSON encoders, which mostly support JSON::PP booleans.\n\nPlease note that JSON::PP::Boolean and boolean.pm behave a bit differently. Ideally you\nshould only use them in boolean context.\n\nIf not set, booleans are loaded as special perl variables \"PLsvyes\" and \"PLsvno\", which\nhave the disadvantage that they are readonly, and you can't add those to an existing data\nstructure with pure perl.\n\nIf you simply need to load \"perl booleans\" that are true or false in boolean context, you\nwill be fine with the default setting.\n\n$YAML::XS::Indent (since v0.76)\nDefault is 2.\n\nSets the number of spaces for indentation for \"Dump\".\n\nUSING YAML::XS WITH UNICODE\nHandling unicode properly in Perl can be a pain. YAML::XS only deals with streams of utf8\noctets. Just remember this:\n\n$perl = Load($utf8octets);\n$utf8octets = Dump($perl);\n\nThere are many, many places where things can go wrong with unicode. If you are having problems,\nuse Devel::Peek on all the possible data points.\n",
                "subsections": []
            },
            "LIBYAML": {
                "content": "You can find out (since v.079) which libyaml version this module was built with:\n\nmy $libyamlversion = YAML::XS::LibYAML::libyamlversion();\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "*   YAML.pm\n\n*   YAML::Syck\n\n*   YAML::Tiny\n\n*   YAML::PP\n\n*   YAML::PP::LibYAML\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Ingy döt Net <ingy@cpan.org>\n",
                "subsections": []
            },
            "COPYRIGHT AND LICENSE": {
                "content": "Copyright 2007-2021. 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": []
            }
        }
    }
}