{"id":15044817,"url":"https://github.com/a248/dazzleconf","last_synced_at":"2025-09-08T04:33:22.376Z","repository":{"id":54129819,"uuid":"297182812","full_name":"A248/DazzleConf","owner":"A248","description":"Incredible configuration library","archived":false,"fork":false,"pushed_at":"2023-07-09T10:48:36.000Z","size":434,"stargazers_count":58,"open_issues_count":21,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-10T00:42:55.451Z","etag":null,"topics":["config","configuration","configuration-files","configuration-management","hocon","java","java-11","java-8","java-library","json","yaml"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/A248.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","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":"2020-09-20T23:36:18.000Z","updated_at":"2025-02-19T01:16:30.000Z","dependencies_parsed_at":"2024-09-28T23:21:07.323Z","dependency_job_id":"b787217c-e5fd-463e-bad0-17594fd59fde","html_url":"https://github.com/A248/DazzleConf","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/A248%2FDazzleConf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/A248%2FDazzleConf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/A248%2FDazzleConf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/A248%2FDazzleConf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/A248","download_url":"https://codeload.github.com/A248/DazzleConf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248137998,"owners_count":21053775,"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":["config","configuration","configuration-files","configuration-management","hocon","java","java-11","java-8","java-library","json","yaml"],"created_at":"2024-09-24T20:51:05.036Z","updated_at":"2025-04-10T00:43:02.457Z","avatar_url":"https://github.com/A248.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# DazzleConf [![Maven Central](https://img.shields.io/maven-central/v/space.arim.dazzleconf/dazzleconf-parent?color=brightgreen\u0026label=maven%20central)](https://mvnrepository.com/artifact/space.arim.dazzleconf/dazzleconf-core) [![Javadoc](https://javadoc.io/badge2/space.arim.dazzleconf/dazzleconf-core/javadoc.svg)](https://javadoc.io/doc/space.arim.dazzleconf/dazzleconf-core) [![discord](https://img.shields.io/discord/784154359067443280?label=discord)](https://discord.gg/es9EuHqqNr)\n\nPrepare to be dazzled\n\n## Introduction\n\nIt's here. The moment you've been waiting for.\n\nA type-safe, thread-safe, fail-fast, user-oriented, easy to setup, extensible and flexible configuration library.\n\n### Objectives\n\n* *Eliminate* stringly-typed spaghetti such as `getString(\"key\")` or `getAsInt(\"section.subsection\")`. Use your configuration just as you would any other immutable bean.\n\n* *Write defaults once* and never bother with them again.\n\n* *Validate configuration* in all manners, and fail-fast with informative messages.\n\n* *Easily update* old configurations with the latest keys. No need to version config files.\n\n* *Pave the way* for users with incredibly flexible type conversion.\n\n* *Take advantage of* enums, collections, and nested configuration sections.\n\n### Features\n\n* Lightweight, simple, well-tested library.\n* Immutable and thread safe by design. Values loaded once and never modified thereafter.\n* Readable for programmers and users. Annotation-driven and supports comments.\n* Configuration objects are format-independent.\n* Support for YAML, HOCON, and JSON out of the box, and allows easy extension with more formats.\n* Identify the precise cause of user errors.\n* Use a decoupled and testable config interface.\n\n## Usage\n\n### Example\n\n```java\n@ConfSerialisers(URLSerialiser.class)\npublic interface MyConfig {\n\n  @DefaultInteger(3)\n  int someInteger();\n  \n  @ConfKey(\"display.user-message\")\n  @ConfComments(\"The message shown when a certain thing happens\")\n  @DefaultString(\"Hello user\")\n  String userMessage();\n  \n  @ConfKey(\"display.enable-user-message\")\n  @DefaultBoolean(true)\n  boolean enableUserMessage();\n  \n  @IntegerRange(min = 1, max = Integer.MAX_VALUE - 1)\n  @DefaultLong(10)\n  long boundedNumeric();\n  \n  @DefaultString(\"ONE\")\n  MyEnum enumValue();\n  \n  @SubSection\n  NestedSection nestedConfigSection();\n\n  @DefaultString(\"https://github.com\")\n  URL validUrl();\n\n}\n\npublic enum MyEnum {\n  ONE,\n  TWO\n}\n\n\npublic interface NestedSection {\n\n  @ConfComments(\"Every annotation shown above works here too\")\n  @DefaultString(\"Also, methods are inherited if this interface extends another, enabling inheritable config interfaces\")\n  String flexibility();\n\n}\n```\n\nWhen using the YAML configuration format, the following result can be generated by writing the default configuration:\n\n```yaml\nsomeInteger: 3\ndisplay:\n  # The message shown when a certain thing happens\n  user-message: 'Hello user'\n  enable-user-message: true\nboundedNumeric: 10\nenumValue: 'ONE'\nnestedConfigSection:\n  # Every annotation shown above works here too\n  flexibility: 'Also, methods are inherited if this interface extends another, enabling inheritable config interfaces'\nvalidUrl: 'https://github.com'\n```\n\nThe same document can be reparsed to an instance of the configuration interface. Type and constraint validation is performed when config values are parsed and loaded, not when they are retrieved - having an instance of the config interface is enough to ensure the configuration is valid.\n\n### Requirements\n\n* Java 8\n\nJava 11 is recommended, but not required.\n\n`module-info` files are also included, and these are backwards compatible with Java 8.\n\n### Getting Started\n\nThis page will help you out: https://github.com/A248/DazzleConf/wiki/Getting-Started\n\nThe wiki also has extra examples such as with setting up a reloadable configuration, automatically updating the configuration with the latest keys, and more.\n\n### Documentation\n\nSee [the docs folder](https://github.com/A248/DazzleConf/tree/master/docs) of this repository for a detailed overview.\n\nAdditionally, the javadocs are published with the artifact. They can also be browsed [here](https://javadoc.io/doc/space.arim.dazzleconf/dazzleconf-core).\n\n### License\n\nLGPL. See the license file for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa248%2Fdazzleconf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fa248%2Fdazzleconf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa248%2Fdazzleconf/lists"}