{"id":21195600,"url":"https://github.com/openpeeps/nyml","last_synced_at":"2025-07-10T04:30:28.372Z","repository":{"id":43321651,"uuid":"419443219","full_name":"openpeeps/nyml","owner":"openpeeps","description":"A stupid simple YAML Parser. From YAML to stringified JSON, JsonNode or Nim objects. Written in Nim language 👑","archived":false,"fork":false,"pushed_at":"2024-05-10T13:55:13.000Z","size":276,"stargazers_count":19,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-05-10T14:54:36.862Z","etag":null,"topics":["json","nim","nim-language","nyml","yaml","yaml-parser","yaml2json","yml-parser"],"latest_commit_sha":null,"homepage":"https://openpeeps.github.io/nyml","language":"Nim","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openpeeps.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2021-10-20T18:19:29.000Z","updated_at":"2024-05-10T13:55:16.000Z","dependencies_parsed_at":"2023-02-15T19:00:34.537Z","dependency_job_id":"c2f208cc-76db-4e1a-aac6-c917bb095b92","html_url":"https://github.com/openpeeps/nyml","commit_stats":null,"previous_names":["openpeeps/nyml"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openpeeps%2Fnyml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openpeeps%2Fnyml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openpeeps%2Fnyml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openpeeps%2Fnyml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openpeeps","download_url":"https://codeload.github.com/openpeeps/nyml/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225618234,"owners_count":17497482,"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":["json","nim","nim-language","nyml","yaml","yaml-parser","yaml2json","yml-parser"],"created_at":"2024-11-20T19:29:05.425Z","updated_at":"2024-11-20T19:29:06.016Z","avatar_url":"https://github.com/openpeeps.png","language":"Nim","funding_links":["https://www.paypal.com/donate/?hosted_button_id=RJK3ZTDWPL55C"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  😋 A stupid simple YAML Parser.\u003cbr\u003eFrom \u003ccode\u003eYAML\u003c/code\u003e to stringified \u003ccode\u003eJSON\u003c/code\u003e, \u003ccode\u003eJsonNode\u003c/code\u003e or \u003ccode\u003eNim\u003c/code\u003e objects via \u003ccode\u003epkg/jsony\u003c/code\u003e\u003cbr\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ccode\u003enimble install nyml\u003c/code\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://openpeeps.github.io/nyml/\"\u003eAPI reference\u003c/a\u003e\u003cbr\u003e\u003cbr\u003e\n  \u003cimg src=\"https://github.com/openpeeps/nyml/workflows/test/badge.svg\" alt=\"Github Actions\"\u003e \u003cimg src=\"https://github.com/openpeeps/nyml/workflows/docs/badge.svg\" alt=\"Github Actions\"\u003e\n\u003c/p\u003e\n\n\n## 😍 Key Features\n- [x] `integer`, `string`, `boolean`, `array`, `object`\n- [x] `GET` access using `dot` annotations\n- [x] Direct to object parser using [JSONY](https://github.com/treeform/jsony)\n- [x] Rules and Validator\n- [x] Open Source | `MIT` License\n\n## Example\n\n\u003cdetails\u003e\n  \u003csummary\u003eA simple YAML file\u003c/summary\u003e\n\n```yaml\nname: test\non:\n  push:\n    paths-ignore:\n      - LICENSE\n      - README.*\n  pull_request:\n    paths-ignore:\n      - LICENSE\n      - README.*\njobs:\n  test:\n    runs-on: ubuntu-latest\n    strategy:\n      matrix:\n        nim-version:\n          - 'stable'\n    steps:\n      - uses: actions/checkout@v2\n      - uses: jiro4989/setup-nim-action@v1\n        with:\n          nim-version: ${{ matrix.nim-version }}\n          repo-token: ${{ secrets.GITHUB_TOKEN }}\n      - run: nimble install -Y\n      - run: nim --threads:on c -r src/tim.nim\n      - run: nimble test\n\n```\n\n\u003c/details\u003e\n\n### Get JSON document\n```nim\nlet contents = readFile(\"sample.yaml\")\nlet jsonContents: JsonNode = yaml(contents).toJson.get\n```\n\n### Get a specific value using `.` notation\n```nim\nlet osName: JsonNode = yaml(contents).toJson.get(\"jobs.test.runs-on\")\necho osName.getStr\n```\n\n### Handle variables\n\n```nim\nlet example = \"\"\"\nname: ${{username}}\n\"\"\"\nlet yml = yaml(example, data = %*{\"username\": \"John Do The Do\"})\necho yml # {\"name\": \"John Do The Do\"}\n```\n\n### Dump YAML to stringified JSON\n```nim\necho yaml(contents)\n\n# dump to json with indentation\necho yaml(contents, true)\n\n```\n\n### ❤ Contributions \u0026 Support\n- 🐛 Found a bug? [Create a new Issue](https://github.com/openpeeps/nyml/issues)\n- 👋 Wanna help? [Fork it!](https://github.com/openpeeps/nyml/fork)\n- 😎 [Get €20 in cloud credits from Hetzner](https://hetzner.cloud/?ref=Hm0mYGM9NxZ4)\n- 🥰 [Donate to OpenPeeps via PayPal address](https://www.paypal.com/donate/?hosted_button_id=RJK3ZTDWPL55C)\n\n### 🎩 License\n`MIT` license. [Made by Humans from OpenPeeps](https://github.com/openpeeps).\u003cbr\u003e\nCopyright \u0026copy; 2023 OpenPeeps \u0026 Contributors \u0026mdash; All rights reserved.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenpeeps%2Fnyml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenpeeps%2Fnyml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenpeeps%2Fnyml/lists"}