{"id":17303993,"url":"https://github.com/owainlewis/yaml","last_synced_at":"2025-04-05T04:12:39.020Z","repository":{"id":36445017,"uuid":"40750065","full_name":"owainlewis/yaml","owner":"owainlewis","description":"A fast, idiomatic and easy to use Clojure YAML library. Based on Snake YAML","archived":false,"fork":false,"pushed_at":"2024-07-01T09:08:56.000Z","size":72,"stargazers_count":77,"open_issues_count":8,"forks_count":24,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-29T03:07:04.400Z","etag":null,"topics":["clojure","snakeyaml","yaml"],"latest_commit_sha":null,"homepage":"","language":"Clojure","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/owainlewis.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":"2015-08-15T06:59:00.000Z","updated_at":"2024-07-01T09:08:59.000Z","dependencies_parsed_at":"2024-12-14T17:02:12.866Z","dependency_job_id":"5ca55290-434f-4955-93e8-c866b5953468","html_url":"https://github.com/owainlewis/yaml","commit_stats":{"total_commits":79,"total_committers":15,"mean_commits":5.266666666666667,"dds":0.2784810126582279,"last_synced_commit":"77137d3e47bc4f443ade6c0cb972a84c7f531546"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/owainlewis%2Fyaml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/owainlewis%2Fyaml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/owainlewis%2Fyaml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/owainlewis%2Fyaml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/owainlewis","download_url":"https://codeload.github.com/owainlewis/yaml/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247284951,"owners_count":20913704,"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":["clojure","snakeyaml","yaml"],"created_at":"2024-10-15T11:51:53.527Z","updated_at":"2025-04-05T04:12:38.997Z","avatar_url":"https://github.com/owainlewis.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# YAML\n\nCI Build Status:\n\n[![CircleCI](https://circleci.com/gh/owainlewis/yaml/tree/master.svg?style=svg)](https://circleci.com/gh/owainlewis/yaml/tree/master)\n\n### About\nAn updated YAML library for Clojure based on Snake YAML and heavily inspired by clj-yaml\n\n## Install\n\n### Lein\n\n[![Clojars Project](http://clojars.org/io.forward/yaml/latest-version.svg)](http://clojars.org/io.forward/yaml)\n\n## Usage\n\n```clojure\n(ns demo.core\n  (:refer-clojure :exclude [load])\n  (:require [yaml.core :as yaml]))\n\n;; Note on DSL\n;; yaml/load \u0026 yaml/parse-string are identical\n;; yaml/dump \u0026 yaml/generate-string are identical\n\n;; Parse a YAML file\n\n(yaml/from-file \"config.yml\")\n\n;; Parse a YAML string\n\n(yaml/parse-string \"foo: bar\")\n\n;; Optionally pass `true` as a second argument to from-file or parse-string to keywordize all keys\n(yaml/parse-string \"foo: bar\" :keywords true)\n\n;; Parsing YAML with unknown tags\n(yaml/parse-string \"--- !foobar\n  foo: HELLO WORLD\")\n\n;; This will parse properly\n(yaml/parse-string \"--- !foobar\n  foo: HELLO WORLD\" :constructor yaml.reader/passthrough-constructor)\n\n;; Dump YAML\n\n(yaml/generate-string {:foo \"bar\"})\n\n;; Examples\n\n(yaml/generate-string [{:name \"John Smith\", :age 33} {:name \"Mary Smith\", :age 27}])\n;; \"- {name: John Smith, age: 33}\\n- {name: Mary Smith, age: 27}\\n\"\n\n(yaml/parse-string \"\n- {name: John Smith, age: 33}\n- name: Mary Smith\n  age: 27\n\")\n\n=\u003e ({:name \"John Smith\", :age 33}\n    {:name \"Mary Smith\", :age 27})\n\n;; Output Formatting examples\n\n(def data [{:name \"John Smith\", :age 33} {:name \"Mary Smith\", :age 27}])\n\n(yaml/generate-string data)\n=\u003e - {age: 33, name: John Smith}\n   - {age: 27, name: Mary Smith}\n\n(yaml/generate-string data :dumper-options {:flow-style :flow})\n=\u003e [{age: 33, name: John Smith}, {age: 27, name: Mary Smith}]\n\n(yaml/generate-string data :dumper-options {:flow-style :block})\n=\u003e - age: 33\n     name: John Smith\n   - age: 27\n     name: Mary Smith\n\n(yaml/generate-string data :dumper-options {:flow-style :flow :scalar-style :single-quoted})\n=\u003e [{'age': !!int '33', 'name': 'John Smith'}, {'age': !!int '27', 'name': 'Mary Smith'}]\n\nValid values for flow-style are:\n- :auto\n- :block\n- :flow\n\nValid values for scalar-style are:\n- :double-quoted\n- :single-quoted\n- :literal\n- :folded\n- :plain\n\nAll are documented at http://yaml.org/spec/current.html\n```\n\nThis is mainly an updated version of clj-yaml with some updates\n\n1. Updates snake YAML to latest version\n2. Split reader and writer into separate protocols and files\n3. Ability to read YAML from file in single function\n4. Return vector [] instead of list when parsing java.util.ArrayList\n5. Ability to parse multiple documents\n\n## License\n\nDistributed under the Eclipse Public License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fowainlewis%2Fyaml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fowainlewis%2Fyaml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fowainlewis%2Fyaml/lists"}