{"id":24318201,"url":"https://github.com/markrosemaker/yaml","last_synced_at":"2026-04-20T12:04:57.466Z","repository":{"id":272500071,"uuid":"916798896","full_name":"MarkRosemaker/yaml","owner":"MarkRosemaker","description":null,"archived":false,"fork":false,"pushed_at":"2025-01-14T21:10:17.000Z","size":505,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-22T07:17:28.977Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/MarkRosemaker.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2025-01-14T19:27:30.000Z","updated_at":"2025-01-14T21:10:19.000Z","dependencies_parsed_at":"2025-01-14T20:55:14.636Z","dependency_job_id":"009a400d-0cec-4de4-beaa-8d2fb30ad1a7","html_url":"https://github.com/MarkRosemaker/yaml","commit_stats":null,"previous_names":["markrosemaker/yaml"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarkRosemaker%2Fyaml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarkRosemaker%2Fyaml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarkRosemaker%2Fyaml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarkRosemaker%2Fyaml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MarkRosemaker","download_url":"https://codeload.github.com/MarkRosemaker/yaml/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242903080,"owners_count":20204210,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":"2025-01-17T14:37:33.326Z","updated_at":"2026-04-20T12:04:57.462Z","avatar_url":"https://github.com/MarkRosemaker.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# YAML Marshalling and Unmarshalling\n\nThis repository provides functionality for YAML marshalling and unmarshalling similar to [JSON v2](https://pkg.go.dev/encoding/json/v2). It allows users to use the same JSON options they would use for JSON v2 to encode and decode YAML.\n\n## Features\n\n- Marshal Go structs to YAML\n- Unmarshal YAML to Go structs\n- Support for JSON v2 options\n\n## Installation\n\nTo install the package, use the following command:\n\n```sh\ngo get github.com/MarkRosemaker/yaml\n```\n\n## Usage\n\nHere is a basic example of how to use the package:\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/MarkRosemaker/yaml\"\n)\n\ntype Example struct {\n\tName string `json:\"name\"`\n\tAge  int    `json:\"age\"`\n}\n\nfunc main() {\n\tex := Example{Name: \"John Doe\", Age: 30}\n\n\t// Marshal to YAML\n\tyamlData, err := yaml.Marshal(ex)\n\tif (err != nil) {\n\t\tfmt.Println(\"Error marshalling to YAML:\", err)\n\t\treturn\n\t}\n\tfmt.Println(\"YAML Data:\", string(yamlData))\n\n\t// Unmarshal from YAML\n\tvar ex2 Example\n\terr = yaml.Unmarshal(yamlData, \u0026ex2)\n\tif (err != nil) {\n\t\tfmt.Println(\"Error unmarshalling from YAML:\", err)\n\t\treturn\n\t}\n\tfmt.Println(\"Unmarshalled Struct:\", ex2)\n}\n```\n\n## JSON v2 Options\n\nThis package supports the same options available in JSON v2 for encoding and decoding. You can use json struct tags to customize the YAML output just as you would with JSON.\n\n## Contributing\n\nContributions are welcome! Please open an issue or submit a pull request.\n\n## License\n\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkrosemaker%2Fyaml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkrosemaker%2Fyaml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkrosemaker%2Fyaml/lists"}