{"id":23392765,"url":"https://github.com/thegatesdev/maple","last_synced_at":"2025-08-24T11:31:07.404Z","repository":{"id":89611489,"uuid":"513473252","full_name":"thegatesdev/maple","owner":"thegatesdev","description":"A clean, type safe intermediary structure","archived":true,"fork":false,"pushed_at":"2025-03-04T08:54:03.000Z","size":1285,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-13T00:42:18.922Z","etag":null,"topics":["config","configuration","configuration-files","data-structures","json","yaml"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thegatesdev.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":"2022-07-13T10:14:37.000Z","updated_at":"2025-03-04T08:54:45.000Z","dependencies_parsed_at":"2024-01-10T20:34:48.368Z","dependency_job_id":"c7555246-57fb-448e-8874-59b2c0c1250d","html_url":"https://github.com/thegatesdev/maple","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/thegatesdev/maple","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thegatesdev%2Fmaple","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thegatesdev%2Fmaple/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thegatesdev%2Fmaple/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thegatesdev%2Fmaple/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thegatesdev","download_url":"https://codeload.github.com/thegatesdev/maple/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thegatesdev%2Fmaple/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271854475,"owners_count":24834453,"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","status":"online","status_checked_at":"2025-08-24T02:00:11.135Z","response_time":111,"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":["config","configuration","configuration-files","data-structures","json","yaml"],"created_at":"2024-12-22T05:15:15.706Z","updated_at":"2025-08-24T11:31:07.393Z","avatar_url":"https://github.com/thegatesdev.png","language":"Java","readme":"\u003e [!IMPORTANT]\n\u003e **Maple has been archived!**\n\u003e \n\u003e Maple was a fun side project discovering how to create nice looking libraries and API's. I will no longer work on it, but it's a nice display of my Java skills ;]\n\u003e\n\u003e What I learned:\n\u003e - How to use modern Java features like try-with-resources, records and pattern matching switches.\n\u003e - Pre-mature optimization is a really bad thing.\n\u003e - Defining the scope of a project before starting will save you time.\n\u003e - How to write good documentation, and that things that are clear to you won't necessarily make sense to someone else.\n\u003e - How to publish to JitPack.\n\u003e - How to use the Java module system (❤)\n\u003e - Immutability in Java comes with a cost.\n\u003e - Parsing is easy, parsing the right way is hard, performant parsing with readable code is impossible.\n\u003e - Side projects are fun to look back on.\n\n## Old README content\n\n*This is a **WIP version** of this document for the upcoming v5.0.0 release.*\n\n[![maple-banner-plain](doc/maple-banner-plain.svg)](#)\n\n[![License](https://img.shields.io/github/license/thegatesdev/maple?style=flat-square\u0026labelColor=%230C090D\u0026color=%23EB5600)](#)\n[![CodeFactor Grade](https://img.shields.io/codefactor/grade/github/thegatesdev/maple?style=flat-square\u0026labelColor=%230C090D\u0026color=%23EB5600)](https://www.codefactor.io/repository/github/thegatesdev/maple)\n[![Last commit)](https://img.shields.io/github/last-commit/thegatesdev/maple?style=flat-square\u0026labelColor=%230C090D\u0026color=%23EB5600)](https://github.com/thegatesdev/maple/commits/main/)\n[![Latest version tag](https://img.shields.io/github/v/release/thegatesdev/maple?style=flat-square\u0026labelColor=%230C090D\u0026color=%23EB5600)](https://github.com/thegatesdev/maple/releases)\n[![Total downloads](https://img.shields.io/github/downloads/thegatesdev/maple/total?style=flat-square\u0026labelColor=%230C090D\u0026color=%23EB5600)](https://github.com/thegatesdev/maple/releases)\n\nA clean, type safe intermediary structure in Java\n\n*Updated for version 5.0.0*\n\n*TODO: Add inspiration section*\n\n*TODO: Split into 'Usage' and 'About' sections*\n\n## Inspiration\n\n## About\n\n*TODO: get to the point faster, save trivia for some other place*\n\n**Maple** was originally intended as a replacement to the Spigot Configuration API,\nwhich allows Minecraft plugins to read data from configuration files.\nThis is still my use-case for this library, but the goals have grown way past that.\n\nMy goal with this library is to represent JSON like configuration values\nin a clean and understandable structure, with plenty of utilities for different scenario's,\nwhile taking inspiration from (and possibly improving upon) existing libraries.\n\nFeel free to open an issue or submit a pull request if you have any concerns or suggestions.\n\n## Including in your project\n\n*TODO: Show maven and gradle include examples*\n\n**Maple** is public on GitHub, meaning you can easily get it from JitPack.\n\nHead to https://jitpack.io/#thegatesdev/maple,\nselect a version and follow the instructions for your build system.\nNow you are ready to dive in!\n\n## Setting some rules\n\nHere are some rules to keep in mind while using **Maple**:\n\n-  **`null` is not invited to the party.**\nThis library does not allow `null` values passed in, and guarantees that no `null` will ever be returned.\n\n- **Non-exported packages are unsafe.**\nThe `module-info.java` defines the packages that are exported.\nIf you are not using the Java module system, it is still not recommended\nto use the classes in the packages that are not exported. \nThese packages are considered outside the public facing API and can change without warning.\n\n## Creating elements\n\n*TODO: Look for alternatives to saying 'you can'*\n\nYou can directly create elements of primitive types...\n```java\nElement intElement = Element.of(30);\nElement boolElement = Element.of(true);\nElement stringElement = Element.of(\"foo\");\n```\nFor constructing lists and dictionaries, use the corresponding builders...\n```java\nListElement listElement = ListElement.builder()\n        .add(Element.of(30))\n        .add(Element.of(true))\n        .add(Element.of(\"foo\"))\n        .build();\n\nDictElement dictElement = DictElement.builder()\n        .put(\"int\", Element.of(30))\n        .put(\"bool\", Element.of(true))\n        .put(\"string\", Element.of(\"foo\"))\n        .build();\n```\nMerging dictionaries can also be done using builders...\n```java\nDictElement original;\nDictElement other;\nDictElement merged = original.toBuilder()\n        .putAll(other)\n        .build();\n```\n\n## Getting values from elements\n\n*TODO: Needs smaller examples*\n\nObtaining values has never looked nicer...\n```java\nDictElement dictElement; // assuming the dictionary from the above example\n\ndictElement.get(\"int\").isNumber(); // true\nboolean boolValue = dictElement.get(\"bool\").getBool(); // true\nboolean invalidBoolValue = dictElement.get(\"string\").getBool(); // throws ElementTypeException\nOptional\u003cElement\u003e notPresent = dictElement.find(\"not_present\"); // empty optional\n```\n\n## Goals\n\n**Maple** is definitely not finished. Here are some of the features I'd like to implement in the future:\n\n- Implement parsing for at least JSON and YAML files. Some would call this essential.\n- Better API for user feedback, like getting the path of an element.\n- Object mapping.\n- Saving and loading API, possibly with live update.\n\n## The end\n\nThank you for reading, and have a nice day!\n\nYou can find me on Discord under the tag `thegatesdev`.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthegatesdev%2Fmaple","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthegatesdev%2Fmaple","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthegatesdev%2Fmaple/lists"}