{"id":14960533,"url":"https://github.com/jimmycushnie/jecs","last_synced_at":"2025-04-04T17:05:48.764Z","repository":{"id":36158876,"uuid":"149901195","full_name":"JimmyCushnie/JECS","owner":"JimmyCushnie","description":"Jimmy's Epic Config System","archived":false,"fork":false,"pushed_at":"2025-01-18T21:48:40.000Z","size":3567,"stargazers_count":157,"open_issues_count":16,"forks_count":15,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-04T17:05:44.787Z","etag":null,"topics":["config","configuration-files","csharp","csharp-code","csharp-library","markup-language","serialization","serialization-format","serialization-library","unity","unity3d","unity3d-plugin"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"wtfpl","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JimmyCushnie.png","metadata":{"files":{"readme":"README.md","changelog":"Changelog.md","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":"2018-09-22T17:39:04.000Z","updated_at":"2025-02-17T06:31:05.000Z","dependencies_parsed_at":"2023-01-16T22:59:58.814Z","dependency_job_id":"8ba2b9a9-ac62-492b-a938-61e0ddc7fe2a","html_url":"https://github.com/JimmyCushnie/JECS","commit_stats":{"total_commits":401,"total_committers":11,"mean_commits":36.45454545454545,"dds":0.5062344139650873,"last_synced_commit":"986412de5280701c677f29294074e811b343531e"},"previous_names":["jimmycushnie/succ"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JimmyCushnie%2FJECS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JimmyCushnie%2FJECS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JimmyCushnie%2FJECS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JimmyCushnie%2FJECS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JimmyCushnie","download_url":"https://codeload.github.com/JimmyCushnie/JECS/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247217175,"owners_count":20903008,"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-files","csharp","csharp-code","csharp-library","markup-language","serialization","serialization-format","serialization-library","unity","unity3d","unity3d-plugin"],"created_at":"2024-09-24T13:22:28.337Z","updated_at":"2025-04-04T17:05:48.748Z","avatar_url":"https://github.com/JimmyCushnie.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JECS\n\nJimmy's Epic Config System\n\n---\n\nJECS is a C# library for reading and writing configuration files. It is focused on ease of use: the API is simple and intuitive, and the generated files are likewise straightforward, readable, and easy to manually tweak.\n\nJECS makes it easy for you to expose data in your program through human-readable and human-editable plaintext files. We use it extensively in [Logic World](https://store.steampowered.com/app/1054340/Logic_World/) for the game's user settings, save files, modding system, and more.\n\n## Basic usage\n\nCreate a `DataFile` object, which corresponds to an actual `.jecs` file on disk. Use the `Get()` and `Set()` methods to get and set data in the file.\n\n```csharp\nvar userSettingsFile = new DataFile(path: \"user_settings.jecs\");\n\n// Gets the string stored in user_settings.jecs under the key `user_name`.\n// If no key by that name exists, it will be created set to `Spongebob Squarepants`.\nstring userName = userSettingsFile.Get(key: \"user_name\", defaultValue: \"Spongebob Squarepants\");\n\n// Outputs the value stored in the file, or \"Spongebob Squarepants\" if the value/file didn't exist yet.\nConsole.WriteLine(userName);\n```\n\nThe above code will create a file called `user_settings.jecs` with the following contents:\n\n```yaml\nuser_name: Spongebob Squarepants\n```\n\n## Intermediate usage\n\nJECS cleanly handles complex nested data structures. You can feed JECS most kinds of data, and that data will be saved and loaded as expected.\n\n```csharp\nclass RepeatingReminder\n{\n    public string ReminderText;\n    public DayOfWeek Day;\n    public BigInteger Importance;\n}\n\nstatic void Main()\n{\n    var reminders = new RepeatingReminder[]\n    {\n        new RepeatingReminder()\n        {\n            ReminderText = \"Water plants\",\n            Day = DayOfWeek.Thursday,\n            Importance = 100,\n        },\n        new RepeatingReminder()\n        {\n            ReminderText = \"Check mail\",\n            Day = DayOfWeek.Thursday,\n            Importance = 75,\n        },\n        new RepeatingReminder()\n        {\n            ReminderText = \"Have a shower\",\n            Day = DayOfWeek.Monday,\n            Importance = BigInteger.Pow(9, 40),\n        },\n    };\n\n    var remindersFile = new DataFile(\"reminders.jecs\");\n    remindersFile.Set(key: \"reminders\", value: reminders);\n}\n```\n\nThe above code will create will create a file called `reminders.jecs` with the following contents:\n\n```yaml\nreminders:\n    -\n        ReminderText: Water plants\n        Day: Thursday\n        Importance: 100\n    -\n        ReminderText: Check mail\n        Day: Thursday\n        Importance: 75\n    -\n        ReminderText: Have a shower\n        Day: Monday\n        Importance: 147808829414345923316083210206383297601\n```\n\nThis is a great example of how nice JECS files are. Notice how this config file has everything laid out clearly so that it's easy to find what you're looking for. The file has minimal formatting boilerplate, so that almost everything in the file is the actual data. This file is fast for a human to read, and fast for a human to edit or expand.\n\nFurthermore, JECS gives you a lot of freedom when writing or editing config files. You can add or remove whitespace, use a different indentation level, or add comments. For example:\n\n```yaml\nreminders:\n    -\n        ReminderText  :  Water plants\n        Day           :  Thursday\n        Importance    :  100\n    \n    -\n        ReminderText  :  Check mail\n        Day           :  Wednesday\n        Importance    :  75 # Don't change this. Critical that it's exactly 75\n    \n    -\n        ReminderText  :  Have a shower\n        Day           :  Monday\n        Importance    :  147808829414345923316083210206383297601\n\n# Todo: add reminders about skydiving\n```\n\nFor more information on the file format, see the [File Structure wiki page](https://github.com/JimmyCushnie/JECS/wiki/File-Structure).\n\n## Advanced usage\n\nJECS has many powerful features that make working with it, both from code and in the config files themselves, smooth and easy. This includes [custom base types], [control over the format of generated files], [auto-reloading when a file changes on disk], and much more.\n\n---\n\nFor full documentation on all of JECS's features, and a guide to installing + getting started, see the [wiki](https://github.com/JimmyCushnie/JECS/wiki).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjimmycushnie%2Fjecs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjimmycushnie%2Fjecs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjimmycushnie%2Fjecs/lists"}