{"id":41899658,"url":"https://github.com/yaml/yaml-serde","last_synced_at":"2026-01-25T15:00:45.140Z","repository":{"id":334455565,"uuid":"1104131165","full_name":"yaml/yaml-serde","owner":"yaml","description":"Strongly typed YAML library for Rust","archived":false,"fork":false,"pushed_at":"2026-01-25T04:47:02.000Z","size":1353,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-25T10:15:05.993Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yaml.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE-APACHE","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":null},"created_at":"2025-11-25T19:51:11.000Z","updated_at":"2026-01-25T04:47:06.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/yaml/yaml-serde","commit_stats":null,"previous_names":["yaml/yaml-serde"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/yaml/yaml-serde","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaml%2Fyaml-serde","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaml%2Fyaml-serde/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaml%2Fyaml-serde/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaml%2Fyaml-serde/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yaml","download_url":"https://codeload.github.com/yaml/yaml-serde/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaml%2Fyaml-serde/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28754807,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T13:59:49.818Z","status":"ssl_error","status_checked_at":"2026-01-25T13:59:33.728Z","response_time":113,"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":[],"created_at":"2026-01-25T15:00:30.217Z","updated_at":"2026-01-25T15:00:45.118Z","avatar_url":"https://github.com/yaml.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"YAML Serde\n==========\n\n[\u003cimg alt=\"github\" src=\"https://img.shields.io/badge/github-yaml/yaml--serde-8da0cb?style=for-the-badge\u0026labelColor=555555\u0026logo=github\" height=\"20\"\u003e](https://github.com/yaml/yaml-serde)\n[\u003cimg alt=\"crates.io\" src=\"https://img.shields.io/crates/v/yaml_serde.svg?style=for-the-badge\u0026color=fc8d62\u0026logo=rust\" height=\"20\"\u003e](https://crates.io/crates/yaml_serde)\n[\u003cimg alt=\"docs.rs\" src=\"https://img.shields.io/badge/docs.rs-yaml__serde-66c2a5?style=for-the-badge\u0026labelColor=555555\u0026logo=docs.rs\" height=\"20\"\u003e](https://docs.rs/yaml_serde)\n[\u003cimg alt=\"build status\" src=\"https://img.shields.io/github/actions/workflow/status/yaml/yaml-serde/ci.yml?branch=main\u0026style=for-the-badge\" height=\"20\"\u003e](https://github.com/yaml/yaml-serde/actions?query=branch%3Amain)\n\n\u003e **This is the actively maintained fork of\n\u003e [serde-yaml](https://github.com/dtolnay/serde-yaml), published as `yaml_serde`\n\u003e by the official [YAML organization](https://github.com/yaml).**\n\u003e\n\u003e The original `serde_yaml` crate is no longer maintained.\n\u003e This fork continues development with full compatibility.\n\u003e\n\u003e Original author: David Tolnay\n\nRust library for using the [Serde] serialization framework with data in [YAML]\nfile format.\n\n[Serde]: https://github.com/serde-rs/serde\n[YAML]: https://yaml.org/\n\n## Dependency\n\n```toml\n[dependencies]\nserde = \"1.0\"\nyaml_serde = \"0.10\"\n```\n\nRelease notes are available under [GitHub releases].\n\n[GitHub releases]: https://github.com/yaml/yaml-serde/releases\n\n## Migrating from `serde_yaml`\n\nTo migrate with minimal code changes, use Cargo's package renaming:\n\n```toml\n[dependencies]\nserde_yaml = { package = \"yaml_serde\", version = \"0.10\" }\n```\n\nThis lets you keep all your existing `use serde_yaml::` imports unchanged.\n\nAlternatively, update your imports directly:\n\n```toml\n[dependencies]\nyaml_serde = \"0.10\"\n```\n\nThen change `use serde_yaml::` to `use yaml_serde::` in your code.\n\n## Using Serde YAML\n\n[API documentation is available in rustdoc form][docs.rs] but the general idea\nis:\n\n[docs.rs]: https://docs.rs/yaml_serde\n\n```rust\nuse std::collections::BTreeMap;\n\nfn main() -\u003e Result\u003c(), yaml_serde::Error\u003e {\n    // You have some type.\n    let mut map = BTreeMap::new();\n    map.insert(\"x\".to_string(), 1.0);\n    map.insert(\"y\".to_string(), 2.0);\n\n    // Serialize it to a YAML string.\n    let yaml = yaml_serde::to_string(\u0026map)?;\n    assert_eq!(yaml, \"x: 1.0\\ny: 2.0\\n\");\n\n    // Deserialize it back to a Rust type.\n    let deserialized_map: BTreeMap\u003cString, f64\u003e = yaml_serde::from_str(\u0026yaml)?;\n    assert_eq!(map, deserialized_map);\n    Ok(())\n}\n```\n\nIt can also be used with Serde's derive macros to handle structs and enums\ndefined in your program.\n\n```toml\n[dependencies]\nserde = { version = \"1.0\", features = [\"derive\"] }\nyaml_serde = \"0.10\"\n```\n\nStructs serialize in the obvious way:\n\n```rust\nuse serde::{Serialize, Deserialize};\n\n#[derive(Debug, PartialEq, Serialize, Deserialize)]\nstruct Point {\n    x: f64,\n    y: f64,\n}\n\nfn main() -\u003e Result\u003c(), yaml_serde::Error\u003e {\n    let point = Point { x: 1.0, y: 2.0 };\n\n    let yaml = yaml_serde::to_string(\u0026point)?;\n    assert_eq!(yaml, \"x: 1.0\\ny: 2.0\\n\");\n\n    let deserialized_point: Point = yaml_serde::from_str(\u0026yaml)?;\n    assert_eq!(point, deserialized_point);\n    Ok(())\n}\n```\n\nEnums serialize using YAML's `!tag` syntax to identify the variant name.\n\n```rust\nuse serde::{Serialize, Deserialize};\n\n#[derive(Serialize, Deserialize, PartialEq, Debug)]\nenum Enum {\n    Unit,\n    Newtype(usize),\n    Tuple(usize, usize, usize),\n    Struct { x: f64, y: f64 },\n}\n\nfn main() -\u003e Result\u003c(), yaml_serde::Error\u003e {\n    let yaml = \"\n        - !Newtype 1\n        - !Tuple [0, 0, 0]\n        - !Struct {x: 1.0, y: 2.0}\n    \";\n    let values: Vec\u003cEnum\u003e = yaml_serde::from_str(yaml).unwrap();\n    assert_eq!(values[0], Enum::Newtype(1));\n    assert_eq!(values[1], Enum::Tuple(0, 0, 0));\n    assert_eq!(values[2], Enum::Struct { x: 1.0, y: 2.0 });\n\n    // The last two in YAML's block style instead:\n    let yaml = \"\n        - !Tuple\n          - 0\n          - 0\n          - 0\n        - !Struct\n          x: 1.0\n          y: 2.0\n    \";\n    let values: Vec\u003cEnum\u003e = yaml_serde::from_str(yaml).unwrap();\n    assert_eq!(values[0], Enum::Tuple(0, 0, 0));\n    assert_eq!(values[1], Enum::Struct { x: 1.0, y: 2.0 });\n\n    // Variants with no data can be written using !Tag or just the string name.\n    let yaml = \"\n        - Unit  # serialization produces this one\n        - !Unit\n    \";\n    let values: Vec\u003cEnum\u003e = yaml_serde::from_str(yaml).unwrap();\n    assert_eq!(values[0], Enum::Unit);\n    assert_eq!(values[1], Enum::Unit);\n\n    Ok(())\n}\n```\n\n\u003cbr\u003e\n\n#### License\n\n\u003csup\u003e\nLicensed under either of \u003ca href=\"LICENSE-APACHE\"\u003eApache License, Version\n2.0\u003c/a\u003e or \u003ca href=\"LICENSE-MIT\"\u003eMIT license\u003c/a\u003e at your option.\n\u003c/sup\u003e\n\n\u003cbr\u003e\n\n\u003csub\u003e\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in this crate by you, as defined in the Apache-2.0 license, shall\nbe dual licensed as above, without any additional terms or conditions.\n\u003c/sub\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyaml%2Fyaml-serde","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyaml%2Fyaml-serde","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyaml%2Fyaml-serde/lists"}