{"id":21089753,"url":"https://github.com/hituziando/yamlparserjava","last_synced_at":"2026-05-20T03:36:14.348Z","repository":{"id":18243394,"uuid":"21392956","full_name":"HituziANDO/YAMLParserJava","owner":"HituziANDO","description":"YAML decoder in Java.","archived":false,"fork":false,"pushed_at":"2019-01-04T16:23:51.000Z","size":15,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-12T04:35:09.356Z","etag":null,"topics":["decoder","java","parser","yaml"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HituziANDO.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}},"created_at":"2014-07-01T15:30:24.000Z","updated_at":"2023-11-27T01:02:35.000Z","dependencies_parsed_at":"2022-08-04T23:16:17.194Z","dependency_job_id":null,"html_url":"https://github.com/HituziANDO/YAMLParserJava","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/HituziANDO/YAMLParserJava","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HituziANDO%2FYAMLParserJava","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HituziANDO%2FYAMLParserJava/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HituziANDO%2FYAMLParserJava/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HituziANDO%2FYAMLParserJava/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HituziANDO","download_url":"https://codeload.github.com/HituziANDO/YAMLParserJava/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HituziANDO%2FYAMLParserJava/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33244783,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-20T03:30:51.439Z","status":"ssl_error","status_checked_at":"2026-05-20T03:30:49.443Z","response_time":356,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["decoder","java","parser","yaml"],"created_at":"2024-11-19T21:31:04.579Z","updated_at":"2026-05-20T03:36:14.331Z","avatar_url":"https://github.com/HituziANDO.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# YAMLParserJava\n\n***YAML decoder in Java.***\n\n## Include in your project\n\n1. Puts `src/HashTypeYaml.java` in your project\n1. Sets any package to HashTypeYaml.java\n\n## Usage\n\nFor example, decodes following YAML as test1.yml file.\n\n```yaml\ntest1:\n  id: 1234\n  country: \"Japan\"\n  code:\n  data:\n    users:\n      - Alice\n      - Bob\n      - Chris\n    title: \"ABC Team\"\n    description: \"ABC Team is the best!\"\n```\n\n1. Create instance\n\t\n\t```java\n\tHashTypeYaml yaml = new HashTypeYaml();\n\t```\n\n1. Decode YAML and convert to Map object\n\t\n\t```java\n\ttry {\n\t    Map\u003cString, Object\u003e map = yaml.decode(new FileInputStream(\"test1.yml\"));\n\t} catch (IOException e) {\n\t    // Error handling\n\t}\n\t```\n\t\n\tOr\n\t\n\t```java\n\tMap\u003cString, Object\u003e map = yaml.decodeOrEmpty(\"test1.yml\");\n\t```\n\t\n\t`decodeOrEmpty` does not raise the exception and returns empty map if I/O error is occurred.\n\n1. Get value\n\t\n\t```java\n\t// Get id.\n\tSystem.out.println(map.get(\"test1/id\"));   // =\u003e 1234\n\t\n\t// Get title.\n\tSystem.out.println(map.get(\"test1/data/title\"));   // =\u003e ABC Team\n\t\n\t// Get users.\n\tList users = (List) map.get(\"test1/data/users\");\n\tSystem.out.println(users.get(1));   // =\u003e Bob\n\t```\n\nMore info, see my [sample code](https://github.com/HituziANDO/YAMLParserJava/blob/master/src/Main.java).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhituziando%2Fyamlparserjava","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhituziando%2Fyamlparserjava","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhituziando%2Fyamlparserjava/lists"}