{"id":37023181,"url":"https://github.com/wtetzner/kurgan","last_synced_at":"2026-01-14T02:46:44.291Z","repository":{"id":19902568,"uuid":"23167779","full_name":"wtetzner/kurgan","owner":"wtetzner","description":"Java Configuration Library","archived":false,"fork":false,"pushed_at":"2022-12-14T20:44:50.000Z","size":54,"stargazers_count":2,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-10-20T23:51:12.533Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wtetzner.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-08-20T23:38:37.000Z","updated_at":"2020-10-13T14:53:51.000Z","dependencies_parsed_at":"2023-01-13T20:39:53.995Z","dependency_job_id":null,"html_url":"https://github.com/wtetzner/kurgan","commit_stats":null,"previous_names":[],"tags_count":9,"template":null,"template_full_name":null,"purl":"pkg:github/wtetzner/kurgan","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wtetzner%2Fkurgan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wtetzner%2Fkurgan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wtetzner%2Fkurgan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wtetzner%2Fkurgan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wtetzner","download_url":"https://codeload.github.com/wtetzner/kurgan/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wtetzner%2Fkurgan/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28408737,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-14T02:46:43.616Z","updated_at":"2026-01-14T02:46:44.279Z","avatar_url":"https://github.com/wtetzner.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/wtetzner/kurgan.png?branch=master)](https://travis-ci.org/wtetzner/kurgan)\n\nKurgan\n======\n\nKurgan is a Java library for loading YAML configuration files. It is\ndesigned to be as easy as possible to use, while helping to ensure\ncorrectness.\n\nUsage\n=====\n\nTo use with maven, add\n\n```XML\n\u003cdependency\u003e\n  \u003cgroupId\u003eorg.bovinegenius\u003c/groupId\u003e\n  \u003cartifactId\u003ekurgan\u003c/artifactId\u003e\n  \u003cversion\u003e0.7.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nto your pom.xml.\n\nExample\n=======\n\nThis is an example of a config for a server that serves files from the filesystem over HTTP, but it knows how to convert between various formats.\n\nTo load a YAML file, you first need to define one or more interfaces to represent your configuration.\n\nYou can then load the config by using\n\n```java\nConfigLoader.loadYaml(ConfigInterface.class, \"/path/to/config.yaml\")\n```\n\nto load a file, or\n\n```java\nConfigLoader.loadYaml(ConfigInterface.class, \"classpath:/path/to/config.yaml\")\n```\n\nto load from the classpath.\n\nYou can also use `ConfigLoader.loadAllYaml` to load a list of objects out of a YAML file that has multiple documents in it.\n\n```java\npackage example;\n\nimport org.bovinegenius.kurgan.ConfigLoader;\nimport java.io.File;\nimport java.io.IOException;\nimport java.net.URI;\nimport java.util.List;\n\n\npublic class Tester {\n    public static enum Format {\n        JSON,\n        XML,\n        HTML\n    }\n\n    public static interface Resource\u003cT\u003e {\n        T location();\n        Format format();\n    }\n\n    public static interface HttpResource {\n        @FieldName(\"disk-resource\")\n        Resource\u003cFile\u003e getDiskResource();\n        \n        @FieldName(\"rest-resource\")\n        Resource\u003cURI\u003e getRestResource();\n    }\n    \n    public static interface Config {\n        @FieldName(\"read-only\")\n        boolean readOnly();\n        \n        @FieldName(\"max-file-size\")\n        long maxFileSize();\n        List\u003cHttpResource\u003e getResources();\n    }\n\n    public static void main(String[] args) throws IOException {\n        Config config = ConfigLoader.loadYaml(Config.class, System.getProperty(\"user.home\") + \"/temp/test.yaml\");\n        System.out.println(config);\n    }\n}\n```\n\nHere's an example of what a valid config file might look like.\n\n    \n```yaml\nread-only: true\nmax-file-size: 1000000\n\nresources:\n  - disk-resource:\n      location: /www/files/numbers.json\n      format: JSON\n    rest-resource:\n      location: http://example.com/numbers.xml\n      format: XML\n  - disk-resource:\n      location: /www/files/users.xml\n      format: XML\n    rest-resource:\n      location: http://example.com/users.html\n      format: HTML\n```\n\nBuilding\n========\n\n    mvn package\n\nPublishing\n==========\n\n    mvn deploy -Dgpg.skip=false\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwtetzner%2Fkurgan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwtetzner%2Fkurgan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwtetzner%2Fkurgan/lists"}