{"id":32986420,"url":"https://github.com/amir-s/jute","last_synced_at":"2026-01-21T22:23:48.735Z","repository":{"id":7629964,"uuid":"8989531","full_name":"amir-s/jute","owner":"amir-s","description":"Very simple C++ JSON Parser","archived":false,"fork":false,"pushed_at":"2021-06-17T15:20:56.000Z","size":21,"stargazers_count":73,"open_issues_count":3,"forks_count":25,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-11-13T14:03:36.598Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/amir-s.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}},"created_at":"2013-03-24T16:57:44.000Z","updated_at":"2025-02-07T15:11:26.000Z","dependencies_parsed_at":"2022-09-05T04:50:56.041Z","dependency_job_id":null,"html_url":"https://github.com/amir-s/jute","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/amir-s/jute","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amir-s%2Fjute","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amir-s%2Fjute/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amir-s%2Fjute/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amir-s%2Fjute/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amir-s","download_url":"https://codeload.github.com/amir-s/jute/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amir-s%2Fjute/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28645548,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T21:29:11.980Z","status":"ssl_error","status_checked_at":"2026-01-21T21:24:31.872Z","response_time":86,"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":[],"created_at":"2025-11-13T08:00:38.175Z","updated_at":"2026-01-21T22:23:48.716Z","avatar_url":"https://github.com/amir-s.png","language":"C++","readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/amir-s/jute\"\u003e\n    \u003cimg src=\"jute.svg\" alt=\"jute.svg\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\u003cbr\u003e\n\u003ch3 align=\"center\"\u003eVery simple JSON parser for c++\u003c/h3\u003e\n\u003cbr\u003e\n\u003cbr\u003e\n\n\u003ch3\u003edata.json:\u003c/h3\u003e\n\u003cbr\u003e\n\n```JSON\n{\n   \"examples\": [\n      {\n         \"tag_name\": \"a\",\n         \"attr\": [\n            {\n               \"key\": \"href\",\n               \"value\": \"http://amir.saboury.net\"\n            },\n            {\n               \"key\": \"target\",\n               \"value\": \"_blank\"\n            }\n         ]\n      },\n      {\n         \"this_is\": [\n            \"array\",\n            \"of\",\n            \"strings\"\n         ],\n         \"number_array\": [\n            1,\n            2,\n            4,\n            8,\n            16\n         ],\n         \"pie\": 3.14,\n         \"boolean\": true,\n         \"bug\": null,\n         \"mixed\": [\n            1,\n            2,\n            {\n               \"test1\": -1.2345,\n               \"test2\": false\n            },\n            null,\n            0.4,\n            [\n               \"nested\",\n               [\n                  \"array\",\n                  true\n               ]\n            ],\n            \"end of story!\"\n         ]\n      },\n      {\n         \"done\": true\n      }\n   ]\n}\n```\n\u003cbr\u003e\n\u003cbr\u003e\n\n\u003ch3\u003eexample \"main.cpp\" file\u003c/h3\u003e\n\u003cbr\u003e\n\n```C++\n#include \u003ciostream\u003e\n#include \u003cvector\u003e\n#include \u003cmap\u003e\n#include \u003cstring\u003e\n#include \u003csstream\u003e\n#include \u003cfstream\u003e\n#include \u003ccstring\u003e\n#include \"jute.h\"\nusing namespace std;\n\nint main () {\n    ifstream in(\"data.json\");\n    string str = \"\";\n    string tmp;\n    while (getline(in, tmp)) str += tmp;\n    jute::jValue v = jute::parser::parse(str);\n    cout \u003c\u003c v.to_string() \u003c\u003c endl;\n    cout \u003c\u003c \" ------ \" \u003c\u003c endl;\n    cout \u003c\u003c v[\"examples\"][0][\"attr\"][0][\"value\"].as_string() \u003c\u003c endl;\n    if (v[\"examples\"][1][\"mixed\"][5][1][1].as_bool()) {\n        cout \u003c\u003c v[\"examples\"][1][\"pie\"].as_double() \u003c\u003c endl;\n        cout \u003c\u003c v[\"examples\"][2].to_string() \u003c\u003c endl;\n    }\n    // You can get type of a jValue by calling its get_type() function\n    // It returns a jType which can be one of these:\n    //    {JSTRING, JOBJECT, JARRAY, JBOOLEAN, JNUMBER, JNULL, JUNKNOWN}\n    //\n    //    if (v[\"examples\"][1][\"mixed\"][5][1][1].get_type() == jute::JBOOLEAN) ...\n    return 0;\n}\n\n```\n\n\u003ch1\u003eNote:\u003c/h1\u003e\n\u003cbr\u003e\n\nThis version is not providing error checking. All functions assume the input string is in valid format of JSON. Also number format checking is poor.\nImprovements are welcome. Read the source code; it is just about 300 LOC  :smile:\n\nLicense: [MIT](https://opensource.org/licenses/MIT)\n======\n","funding_links":[],"categories":["JSON","进程间通信"],"sub_categories":["Json"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famir-s%2Fjute","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famir-s%2Fjute","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famir-s%2Fjute/lists"}