{"id":18550312,"url":"https://github.com/xp-forge/yaml","last_synced_at":"2026-03-09T11:02:43.177Z","repository":{"id":10211099,"uuid":"12306461","full_name":"xp-forge/yaml","owner":"xp-forge","description":"YAML","archived":false,"fork":false,"pushed_at":"2025-05-10T08:31:40.000Z","size":192,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-11-13T06:07:24.603Z","etag":null,"topics":["parser","xp-framework","yaml"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xp-forge.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2013-08-22T19:57:16.000Z","updated_at":"2025-05-10T08:29:25.000Z","dependencies_parsed_at":"2023-01-13T15:48:18.879Z","dependency_job_id":"2978a395-5381-4444-a3d7-528d2dda8497","html_url":"https://github.com/xp-forge/yaml","commit_stats":null,"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"purl":"pkg:github/xp-forge/yaml","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xp-forge%2Fyaml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xp-forge%2Fyaml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xp-forge%2Fyaml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xp-forge%2Fyaml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xp-forge","download_url":"https://codeload.github.com/xp-forge/yaml/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xp-forge%2Fyaml/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30291834,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T02:57:19.223Z","status":"ssl_error","status_checked_at":"2026-03-09T02:56:26.373Z","response_time":61,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["parser","xp-framework","yaml"],"created_at":"2024-11-06T21:04:11.531Z","updated_at":"2026-03-09T11:02:43.132Z","avatar_url":"https://github.com/xp-forge.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"YAML parser\n===========\n\n[![Build status on GitHub](https://github.com/xp-forge/yaml/workflows/Tests/badge.svg)](https://github.com/xp-forge/yaml/actions)\n[![XP Framework Module](https://raw.githubusercontent.com/xp-framework/web/master/static/xp-framework-badge.png)](https://github.com/xp-framework/core)\n[![BSD Licence](https://raw.githubusercontent.com/xp-framework/web/master/static/licence-bsd.png)](https://github.com/xp-framework/core/blob/master/LICENCE.md)\n[![Requires PHP 7.4+](https://raw.githubusercontent.com/xp-framework/web/master/static/php-7_4plus.svg)](http://php.net/)\n[![Supports PHP 8.0+](https://raw.githubusercontent.com/xp-framework/web/master/static/php-8_0plus.svg)](http://php.net/)\n[![Latest Stable Version](https://poser.pugx.org/xp-forge/yaml/version.svg)](https://packagist.org/packages/xp-forge/yaml)\n\n* See https://yaml.org/\n* See https://yaml.org/spec/1.2.2/\n* See https://yaml.org/type/merge.html\n\nUsage example\n-------------\n\n```php\nuse org\\yaml\\{YamlParser, FileInput};\n\n$result= (new YamlParser())-\u003eparse(new FileInput('.travis.yml'));\n// [\n//   language =\u003e \"php\"\n//   php =\u003e [7, 7.1, 7.2, 7.3, 7.4, \"nightly\"]\n//   matrix =\u003e [\n//     allow_failures =\u003e [[\n//       php =\u003e \"nightly\"\n//     ]]\n//   ]\n//   before_script =\u003e [\"curl ...\", ...]\n//   script =\u003e [\"sh xp-run xp.unittest.TestRunner src/test/php\"]\n// ]\n```\n\nInputs\n------\n\n* `org.yaml.FileInput(io.File|string $in)` - Use file instance or a file name\n* `org.yaml.ReaderInput(io.streams.TextReader $in)` - Reads from a text reader\n* `org.yaml.StringInput(string $in)` - Input from a string\n\nMultiple documents\n------------------\n\nYAML sources can contain more than one document. The `parse()` method will only parse the first (or only) document. To retrieve all documents in a given input, use the iterator returned by `documents()` instead.\n\n```php\nuse org\\yaml\\{YamlParser, FileInput};\nuse util\\cmd\\Console;\n\n$parser= new YamlParser();\nforeach ($parser-\u003edocuments(new FileInput('objects.yml')) as $i =\u003e $document) {\n  Console::writeLine('Document #', $i, ': ', $document);\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxp-forge%2Fyaml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxp-forge%2Fyaml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxp-forge%2Fyaml/lists"}