{"id":18933477,"url":"https://github.com/zjhellofss/happyjson","last_synced_at":"2025-09-05T06:31:27.146Z","repository":{"id":88006092,"uuid":"231594763","full_name":"zjhellofss/happyJson","owner":"zjhellofss","description":"C++11实现的Json解析库","archived":false,"fork":false,"pushed_at":"2020-01-05T02:49:58.000Z","size":21,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-06T00:11:13.319Z","etag":null,"topics":["cpp","json","json-parser"],"latest_commit_sha":null,"homepage":"","language":"C++","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/zjhellofss.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,"publiccode":null,"codemeta":null}},"created_at":"2020-01-03T13:29:25.000Z","updated_at":"2025-03-25T01:37:59.000Z","dependencies_parsed_at":"2023-05-22T08:45:33.243Z","dependency_job_id":null,"html_url":"https://github.com/zjhellofss/happyJson","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zjhellofss/happyJson","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zjhellofss%2FhappyJson","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zjhellofss%2FhappyJson/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zjhellofss%2FhappyJson/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zjhellofss%2FhappyJson/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zjhellofss","download_url":"https://codeload.github.com/zjhellofss/happyJson/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zjhellofss%2FhappyJson/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273722702,"owners_count":25156300,"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-09-05T02:00:09.113Z","response_time":402,"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":["cpp","json","json-parser"],"created_at":"2024-11-08T11:54:41.888Z","updated_at":"2025-09-05T06:31:26.767Z","avatar_url":"https://github.com/zjhellofss.png","language":"C++","readme":"# HappyJson\n由C++11实现的支持嵌套的Json解析库\n\n## HappyJson\n\n* 将Json文件可以在内存中转化为Object形式的存在，存放于内存中的键值对以智能指针的形式存在，不需要过度关心内存泄漏的问题\n* 通过向Object中添加对应的属性和值转化为Json字符串\n## HappyJson库的使用方法\n\n```C++\n    //通过文件路径Json字符串并解析得到名为root的Object对象\n    Object *root = readToken(readFile(\"test2.json\"));\n    \n    Object *ageObject = root-\u003egetValue(\"age\");\n    //从root对象中得到Json对象中的int值\n    JsonUtil::getJsonInt(ageObject) \n    \n    Object *plainVec = root-\u003egetValue(\"ar2r\");\n    //从root对象中得到Json对象中的数组值\n    auto vec = JsonUtil::getJsonVec(plainVec);\n    //得到如上数组中的第i个值\n    auto item = JsonUtil::getJsonVecByIndex\u003cstd::string\u003e()(vec, 0);\n    //释放资源\n    JsonUtil::deleteJsonObject(object);\n    //对json的字符串化\n    SerializeJson serializeJson;\n    serializeJson.serializeObject(object);\n    std::string str1 = serializeJson.getOutput();\n\n```\n\n\n## 致谢\n\n感谢CJson、RapidJson为我提供的灵感以及好朋友们提出的建议\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzjhellofss%2Fhappyjson","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzjhellofss%2Fhappyjson","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzjhellofss%2Fhappyjson/lists"}