{"id":26930366,"url":"https://github.com/blobbybilb/java-helpers","last_synced_at":"2025-04-02T06:19:07.165Z","repository":{"id":214811649,"uuid":"714469352","full_name":"blobbybilb/java-helpers","owner":"blobbybilb","description":null,"archived":false,"fork":false,"pushed_at":"2024-03-06T23:00:02.000Z","size":100,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-05-30T02:14:40.926Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blobbybilb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2023-11-04T23:52:16.000Z","updated_at":"2023-12-03T05:50:58.000Z","dependencies_parsed_at":"2024-03-08T20:26:13.791Z","dependency_job_id":null,"html_url":"https://github.com/blobbybilb/java-helpers","commit_stats":null,"previous_names":["blobbybilb/java-helpers"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blobbybilb%2Fjava-helpers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blobbybilb%2Fjava-helpers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blobbybilb%2Fjava-helpers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blobbybilb%2Fjava-helpers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blobbybilb","download_url":"https://codeload.github.com/blobbybilb/java-helpers/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246763877,"owners_count":20829800,"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":[],"created_at":"2025-04-02T06:19:06.664Z","updated_at":"2025-04-02T06:19:07.161Z","avatar_url":"https://github.com/blobbybilb.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# blobbybilb/java-helpers\n\n**Goal:** Fix Java\n\n(jk, that's probably impossible)\n\n**Realistic Goal:** Make java a little less annoying to make stuff with.\n\n### Actually though, what is this?\n\nA set of Java classes that help with commonly used functionality,\nso you don't have to reimplement it everytime (or use Maven/Gradle in a small project).\nYou can use this as a single jar file that you just copy into your project directory,\nbecause it's intended for projects where the extra complexity/annoyingness of\njava build systems/package management is not worth it.\n\n### What does it have?\n\n- A custom JSON parser [(more info)](https://github.com/blobbybilb/java-helpers/tree/master/src/Helpers/JSON#readme)\n- And a JSON serializer too\n- HTTP client (single line HTTP POST/GET)\n- HTTP server (a little WIP but should work)\n- A key-value store\n\n### Docs\n\n#### JSON\n\n```java\n// Parse JSON\nObject data = new JSONParser(jsonString).parse();\n// Serialize JSON\nString jsonString = new JSONSerializer(data).serialize();\n\n// JSON-able Types: Map (JSON object), List (JSON array), String, Number, Boolean, null\n```\n\n#### KV Store\n\n```java\n// Create a KV store, SomeType is the type of the value which can be a JSON-able type (see above)\nKVStore\u003cSomeType\u003e kv = new KVStore\u003c\u003e(dataDirectoryString);\n// Set a value\nkv.set(\"key\", value); // value of type SomeType\n// Get a value\nSomeType value = kv.get(\"key\"); // returns value of type SomeType, throws KVStoreException if key doesn't exist or data is corrupted/invalid\n// Delete a value\nkv.del(\"key\");\n```\n\n#### HTTP Client\n\n```java\n// HTTP GET\nString response = Request.get(\"http://example.com\");\n// HTTP POST\nString response = Request.post(\"http://example.com\", Map\u003cString, String\u003e); // Form data body\nString response = Request.post(\"http://example.com\", String, Helpers.HTTP.ContentType); // Other data body types\n```\n\n#### HTTP Server\n\n```java\nServer server = new Server(3000);\nserver.get\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblobbybilb%2Fjava-helpers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblobbybilb%2Fjava-helpers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblobbybilb%2Fjava-helpers/lists"}