{"id":23610052,"url":"https://github.com/riley-x/jsonette","last_synced_at":"2026-05-01T06:34:01.531Z","repository":{"id":122753647,"uuid":"199190501","full_name":"riley-x/Jsonette","owner":"riley-x","description":"A pico-minimal json parser.","archived":false,"fork":false,"pushed_at":"2019-07-31T14:24:11.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-18T01:08:26.850Z","etag":null,"topics":["c-plus-plus","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/riley-x.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":"2019-07-27T16:43:43.000Z","updated_at":"2019-07-31T14:24:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"74fd4465-329d-49b1-8f82-f27926c396ec","html_url":"https://github.com/riley-x/Jsonette","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/riley-x/Jsonette","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riley-x%2FJsonette","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riley-x%2FJsonette/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riley-x%2FJsonette/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riley-x%2FJsonette/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/riley-x","download_url":"https://codeload.github.com/riley-x/Jsonette/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riley-x%2FJsonette/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32487568,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"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":["c-plus-plus","cpp","json","json-parser"],"created_at":"2024-12-27T15:15:49.431Z","updated_at":"2026-05-01T06:34:01.525Z","avatar_url":"https://github.com/riley-x.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Jsonette\nAn exercise to create a pico-minimal json reader. \n\n### Basic usage:\n\n```c++\n#include \"jsonette.h\"\nusing namespace std;\nusing namespace jsonette;\n\n// from https://json.org/example.html\nstd::string text(R\"( \n  {\n    \"menu\": {\n      \"id\": \"file\",\n      \"value\": \"File\",\n      \"popup\": {\n        \"menuitem\": [\n          {\"value\": \"New\", \"onclick\": \"CreateNewDoc()\"},\n          {\"value\": \"Open\", \"onclick\": \"OpenDoc()\"},\n          {\"value\": \"Close\", \"onclick\": \"CloseDoc()\"}\n        ]\n      }\n    } \n  }\n)\");\n\nJSON j(text);\ncout \u003c\u003c j.type() \u003c\u003c endl; // JType::Object\n\nvector\u003cstring\u003e const \u0026 keys = j.get_keys(); // [\"menu\"]\nvector\u003cJSON\u003e const \u0026 vals = j.get_vals(); \nfor (JSON const \u0026 val : vals) cout \u003c\u003c val.type() \u003c\u003c endl; // [Object]\n\nstring item_value0 = j[\"menu\"][\"popup\"][\"menuitem\"][0][\"value\"].get_str(); // \"New\"\n\ncout \u003c\u003c j.to_string() \u003c\u003c endl; // pretty print\ncout \u003c\u003c j.to_string(false) \u003c\u003c endl; // compact print\n```\n\n### Various value types:\n\n```c++\nJSON j(\"[true, false, null, 123, -3.14e1, \"hello world\", {\"key\": \"value\"}]\");\ncout \u003c\u003c j.type() \u003c\u003c endl; // JType::Array\n\nvector\u003cJSON\u003e const \u0026 vals = j.get_arr();\nfor (JSON const \u0026 val : vals) cout \u003c\u003c val.type() \u003c\u003c endl; // [True, False, Null, Integer, Double, String, Object]\n\nbool b = j[0].get\u003cbool\u003e(); // true\nbool b2 = j[1].get_bool(); // false\nbool b3 = j[2].is_null(); // true\n\nint i = j[3].get\u003cint\u003e(); // 123\nint64_t i2 = j[3].get_int(); // 123\n\ndouble d = j[4].get\u003cdouble\u003e(); // -31.4\ndouble d2 = j[4].get_dbl(); // -31.4\n\nstring s = j[5].get\u003cstring\u003e(); // \"hello world\"\nstring s2 = j[5].get_str(); // \"hello world\"\n\nJSON const \u0026 j2 = j[6];\nstring s3 = j2[\"key\"].get\u003cstring\u003e(); // \"value\"\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Friley-x%2Fjsonette","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Friley-x%2Fjsonette","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Friley-x%2Fjsonette/lists"}