{"id":28959389,"url":"https://github.com/m6vrm/json.hpp","last_synced_at":"2026-04-28T01:31:55.178Z","repository":{"id":300840437,"uuid":"1006322435","full_name":"m6vrm/json.hpp","owner":"m6vrm","description":"Naive JSON encdoing and decoding for C++","archived":false,"fork":false,"pushed_at":"2025-06-23T21:04:58.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-23T22:23:07.408Z","etag":null,"topics":["cpp","json"],"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/m6vrm.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,"zenodo":null}},"created_at":"2025-06-22T02:07:05.000Z","updated_at":"2025-06-23T21:05:01.000Z","dependencies_parsed_at":"2025-06-23T22:34:04.413Z","dependency_job_id":null,"html_url":"https://github.com/m6vrm/json.hpp","commit_stats":null,"previous_names":["m6vrm/json.hpp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/m6vrm/json.hpp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m6vrm%2Fjson.hpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m6vrm%2Fjson.hpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m6vrm%2Fjson.hpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m6vrm%2Fjson.hpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/m6vrm","download_url":"https://codeload.github.com/m6vrm/json.hpp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m6vrm%2Fjson.hpp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32362781,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T20:07:02.737Z","status":"ssl_error","status_checked_at":"2026-04-27T20:07:00.910Z","response_time":128,"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":["cpp","json"],"created_at":"2025-06-24T00:01:44.128Z","updated_at":"2026-04-28T01:31:55.172Z","avatar_url":"https://github.com/m6vrm.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"json.hpp\n========\n\nNaive JSON encoding and decoding for C++.\n\n*   No Unicode support\n*   Comments and trailing comma support\n*   Minimal implementation\n\n\u003e   Inspired by https://github.com/jart/json.cpp.\n\nUsage\n-----\n\nAdd `json.hpp` to your project.\n\n```cpp\n#include \u003ccassert\u003e\n#include \u003ciostream\u003e\n#include \u003cstring\u003e\n\n#define JSON_IMPLEMENTATION\n#define JSON_STRICT  // strict parsing is a bit slower, but doesn't allow invalid json\n#include \"json.hpp\"\n\nint main() {\n    // parse json\n    JSON::Status status;  // status is optional\n    JSON json1;\n    std::string string = R\"(\n        {\n          // comments are ignored\n          \"key\": \"value\", // trailing comma is allowed\n        }\n    )\";\n    bool success = json1.parse(string, \u0026status);\n    assert(success);\n    std::cout \u003c\u003c JSON::status_string(status) \u003c\u003c std::endl;\n\n    // get values\n    assert(json1.empty() == false);\n    assert(json1.size() == 1);\n    assert(json1.has(\"key\"));\n    assert(json1[\"key\"].get_string() == \"value\");\n\n    // create json\n    JSON json2;\n    json2[\"key\"] = \"value\";\n\n    // dump to string\n    std::cout \u003c\u003c json2.dump(true) \u003c\u003c std::endl;\n    assert(json1.dump() == json2.dump());\n\n    return 0;\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm6vrm%2Fjson.hpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fm6vrm%2Fjson.hpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm6vrm%2Fjson.hpp/lists"}