{
    "content": [
        {
            "type": "text",
            "text": "# Psych::Parser (ri)\n\n## Section Outline\n\n- **Psych::Parser < Object** (33 lines)\n- **Constants:** (17 lines)\n- **Class methods:** (2 lines)\n- **Instance methods:** (6 lines)\n- **Attributes:** (3 lines)\n\n## Full Content\n\n### Psych::Parser < Object\n\n(from gem psych-5.4.0)\n------------------------------------------------------------------------\n\nYAML event parser class.  This class parses a YAML document and calls\nevents on the handler that is passed to the constructor.  The events can\nbe used for things such as constructing a YAML AST or deserializing YAML\ndocuments.  It can even be fed back to Psych::Emitter to emit the same\ndocument that was parsed.\n\nSee Psych::Handler for documentation on the events that Psych::Parser\nemits.\n\nHere is an example that prints out ever scalar found in a YAML document:\n\n# Handler for detecting scalar values\nclass ScalarHandler < Psych::Handler\ndef scalar value, anchor, tag, plain, quoted, style\nputs value\nend\nend\n\nparser = Psych::Parser.new(ScalarHandler.new)\nparser.parse(yamldocument)\n\nHere is an example that feeds the parser back in to Psych::Emitter.  The\nYAML document is read from STDIN and written back out to STDERR:\n\nparser = Psych::Parser.new(Psych::Emitter.new($stderr))\nparser.parse($stdin)\n\nPsych uses Psych::Parser in combination with Psych::TreeBuilder to\nconstruct an AST of the parsed YAML document.\n------------------------------------------------------------------------\n\n### Constants:\n\nANY:\nLet the parser choose the encoding\n\n\nUTF16BE:\nUTF-16-BE Encoding with BOM\n\n\nUTF16LE:\nUTF-16-LE Encoding with BOM\n\n\nUTF8:\nUTF-8 Encoding\n\n### Class methods:\n\nnew\n\n### Instance methods:\n\nnativeparse\nexternalencoding\nhandler\nmark\nparse\n\n### Attributes:\n\nattraccessor handler\nattrwriter externalencoding\n\n"
        }
    ],
    "structuredContent": {
        "command": "Psych::Parser",
        "section": "",
        "mode": "ri",
        "summary": null,
        "synopsis": null,
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "Psych::Parser < Object",
                "lines": 33,
                "subsections": []
            },
            {
                "name": "Constants:",
                "lines": 17,
                "subsections": []
            },
            {
                "name": "Class methods:",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "Instance methods:",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "Attributes:",
                "lines": 3,
                "subsections": []
            }
        ]
    }
}