{"id":16374975,"url":"https://github.com/moderocky/argo","last_synced_at":"2025-07-06T15:38:43.798Z","repository":{"id":44395104,"uuid":"512275696","full_name":"Moderocky/Argo","owner":"Moderocky","description":"A lightweight j(a)son library.","archived":false,"fork":false,"pushed_at":"2024-08-05T16:00:51.000Z","size":124,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-12T19:55:56.324Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Moderocky.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-07-09T20:05:31.000Z","updated_at":"2024-08-05T16:00:54.000Z","dependencies_parsed_at":"2023-11-15T10:33:38.402Z","dependency_job_id":"d546effe-9541-46a9-993a-a9a43b0fa3e1","html_url":"https://github.com/Moderocky/Argo","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Moderocky%2FArgo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Moderocky%2FArgo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Moderocky%2FArgo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Moderocky%2FArgo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Moderocky","download_url":"https://codeload.github.com/Moderocky/Argo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253980063,"owners_count":21994043,"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":"2024-10-11T03:19:00.994Z","updated_at":"2025-05-13T16:14:12.613Z","avatar_url":"https://github.com/Moderocky.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"Argo\n=====\n\n### Opus #18\n\nA lightweight J(a)son library.\n\n### Description\n\nThis library converts `json` to Java's map/list object structure and vice-versa. \\\nIt is designed to be very small (one file plus a `JsonException` for nicer errors.) \\\nIt is designed to be as light as possible (interacts directly with streams with a ~16 byte buffer) and disposes of any closeable resources.\n\nJson arrays are converted to `ArrayList`s for easier modification.\n\nIt is also possible to convert Java objects to and from json data directly.\nNote that the data is applied to the appropriate fields.\nFields with illegal Java names (e.g. containing whitespace) will be ignored.\nErrors will be thrown if the field cannot be written to or the data is incompatible.\n\nThis is mainly designed for use with local classes for simpler data dispersion.\nConverting a json array will not convert its `Object` contents.\n\n## Maven Information\n```xml\n\u003crepository\u003e\n    \u003cid\u003ekenzie\u003c/id\u003e\n    \u003cname\u003eKenzie's Repository\u003c/name\u003e\n    \u003curl\u003ehttps://repo.kenzie.mx/releases\u003c/url\u003e\n\u003c/repository\u003e\n``` \n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003emx.kenzie\u003c/groupId\u003e\n    \u003cartifactId\u003eargo\u003c/artifactId\u003e\n    \u003cversion\u003e1.2.2\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### How to Use\n\nReading data...\n\nFrom a json object:\n```java \n// data = { \"hello\": true, \"there\": null }\n// data is String / File / InputStream\ntry (final Json json = new Json(data)) {\n    final Map\u003cString, Object\u003e map = json.toMap();\n}\n\n// Simple string -\u003e map\nfinal Map\u003cString, Object\u003e map = Json.fromJson(data);\n```\n\nFrom a json array:\n```java \n// data = [ 1, 2, 3 ]\n// data is String / File / InputStream\ntry (final Json json = new Json(data)) {\n    final List\u003cObject\u003e list = json.toList();\n}\n```\n\nWriting as json data:\n```java \n// output is a File / Writer\n// map is the data\nnew Json(output).write(map);\n\n// fast object to json string\nJson.toJson(map); // -\u003e { ... }\nJson.toJson(list); // -\u003e [ ... ]\n```\n\nConverting json to an object:\n```java \nclass Result { int a, b; String hello; }\nfinal String string = // { \"a\": 1, \"b\": 6, \"hello\": \"there\" }\nfinal Result result = Json.fromJson(string, new Result());\n```\n\nConverting an object to json:\n```java \nclass Child { int bean = 3; }\nclass Result { String hello = \"there\"; Child child = new Child(); }\nfinal Result result = new Result();\nfinal String string = Json.toJson(result);\n// string = { \"hello\": \"there\", \"child\": { \"bean\": 3 } }\n```\n\nConverting a type with an array:\n```java \n// data = { \"numbers\": [0.5, 2.2, ...], \"children\": [ ... ] }\nclass Result { double[] numbers; Child[] children; }\nfinal Result result = Json.fromJson(data, new Result());\nassert result.numbers[1] == 2.2;\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoderocky%2Fargo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoderocky%2Fargo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoderocky%2Fargo/lists"}