{"id":20573515,"url":"https://github.com/lightweight-component/aj-json","last_synced_at":"2026-02-27T17:12:14.001Z","repository":{"id":299573606,"uuid":"1003458671","full_name":"lightweight-component/aj-json","owner":"lightweight-component","description":"Small JSON parser \u0026 serializer","archived":false,"fork":false,"pushed_at":"2025-06-17T07:31:48.000Z","size":24,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-20T21:54:41.154Z","etag":null,"topics":["java-json","json"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"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/lightweight-component.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,"zenodo":null}},"created_at":"2025-06-17T07:20:13.000Z","updated_at":"2025-06-17T07:31:51.000Z","dependencies_parsed_at":"2025-06-17T08:32:26.026Z","dependency_job_id":null,"html_url":"https://github.com/lightweight-component/aj-json","commit_stats":null,"previous_names":["lightweight-component/aj-json"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lightweight-component/aj-json","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightweight-component%2Faj-json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightweight-component%2Faj-json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightweight-component%2Faj-json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightweight-component%2Faj-json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lightweight-component","download_url":"https://codeload.github.com/lightweight-component/aj-json/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightweight-component%2Faj-json/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29905759,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T14:46:13.553Z","status":"ssl_error","status_checked_at":"2026-02-27T14:46:10.522Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["java-json","json"],"created_at":"2024-11-16T05:27:58.754Z","updated_at":"2026-02-27T17:12:13.993Z","avatar_url":"https://github.com/lightweight-component.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Maven Central](https://img.shields.io/maven-central/v/com.ajaxjs/aj-json?label=Latest%20Release)](https://central.sonatype.com/artifact/com.ajaxjs/aj-json)\n[![Javadoc](https://img.shields.io/badge/javadoc-1.4-brightgreen.svg?)](https://javadoc.io/doc/com.ajaxjs/aj-json)\n[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/lightweight-component/aj-json)\n[![License](https://img.shields.io/badge/license-Apache--2.0-green.svg?longCache=true\u0026style=flat)](http://www.apache.org/licenses/LICENSE-2.0.txt)\n[![Email](https://img.shields.io/badge/Contact--me-Email-orange.svg)](mailto:frank@ajaxjs.com)\n\n# Small JSON parser \u0026 serializer 小型 JSON 解释器\n\n小型 JSON 解析器，实现 JSON 与 Map/List 互换，是了解 JSON 解析的好例子。\n\nThis is a lightweight JSON parser that implements bidirectional conversion between JSON strings and Java data structures such as Map and List. \nThe implementation is simple yet powerful, making it an excellent example for learning how JSON parsing works under the hood.\n\n## Source code\n\n[Github](https://github.com/lightweight-component/aj-json) | [Gitcode](https://gitcode.com/lightweight-component/aj-json)\n\n\n# Install\nRequires Java 1.8+, Maven Snippets:\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.ajaxjs\u003c/groupId\u003e\n    \u003cartifactId\u003eaj-json\u003c/artifactId\u003e\n    \u003cversion\u003e1.4\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n# Usage\n\n```java\n// Java to JSON\nObject obj = true;\nString json = ConvertToJson.toJson(obj);\nassertEquals(\"true\", json);\n\nobj = 123;\njson = ConvertToJson.toJson(obj);\nassertEquals(\"123\", json);\n\nobj = 100000000000000001L;\njson = ConvertToJson.toJson(obj);\nassertEquals(\"\\\"100000000000000001\\\"\", json);\n\nobj = 99999L;\njson = ConvertToJson.toJson(obj);\nassertEquals(\"99999\", json);\n\nobj = \"hello\";\njson = ConvertToJson.toJson(obj);\nassertEquals(\"\\\"hello\\\"\", json);\n\nMap map = new HashMap();\nmap.put(\"name\", \"John\");\nmap.put(\"age\", 30);\njson = ConvertToJson.toJson(map);\nassertEquals(\"{\\\"name\\\":\\\"John\\\",\\\"age\\\":30}\", json);   \n\n// List to JSON\nList list = new ArrayList();\nlist.add(1);\nlist.add(2);\nlist.add(3);\nString json = ConvertToJson.list2Json(list);\nassertEquals(\"[1, 2, 3]\", json);\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flightweight-component%2Faj-json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flightweight-component%2Faj-json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flightweight-component%2Faj-json/lists"}