{"id":16967889,"url":"https://github.com/skyf0l/json-library","last_synced_at":"2026-05-17T03:44:45.716Z","repository":{"id":134742755,"uuid":"243998106","full_name":"skyf0l/JSon-library","owner":"skyf0l","description":"Lightweight JSON library in c","archived":false,"fork":false,"pushed_at":"2020-03-04T23:20:27.000Z","size":159,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-26T13:11:51.125Z","etag":null,"topics":["cjson","json","jsonc","libc"],"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/skyf0l.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-02-29T16:00:57.000Z","updated_at":"2024-10-09T13:06:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"41e7f30c-4a60-4bbd-a41b-bf761f926f1d","html_url":"https://github.com/skyf0l/JSon-library","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyf0l%2FJSon-library","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyf0l%2FJSon-library/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyf0l%2FJSon-library/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyf0l%2FJSon-library/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skyf0l","download_url":"https://codeload.github.com/skyf0l/JSon-library/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244844531,"owners_count":20519790,"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","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":["cjson","json","jsonc","libc"],"created_at":"2024-10-14T00:10:03.718Z","updated_at":"2025-10-20T02:16:58.599Z","avatar_url":"https://github.com/skyf0l.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JSon-library\n### JSon-library supports 6 data types:\n```\nnull\nboolean\ninteger\nstring\nobject\narray\n```\n### Easy to use:\n#### json object:\n```\n#include \u003cjson.h\u003e\n...\njson_object_t *jo = json_object_create();   // create\n\njson_object_put_null(jo, \"null_key\");\njson_object_put_bool(jo, \"bool_key\", 0);\njson_object_put_int(jo, \"int_key\", 144);\njson_object_put_string(jo, \"string_key\", \"hello world!\");\n\njson_object_get_size(jo);                   // return 4\n\njson_object_has(jo, \"unexist_key\");         // return 0\njson_object_has(jo, \"bool_key\");            // return 1\n\njson_object_is_null(jo, \"null_key\");        // return 0\njson_object_is_null(jo, \"string_key\");      // return 1\n\njson_object_get_int(jo, \"int_key\");         // return 144\njson_object_put_int(jo, \"int_key\", 0);\njson_object_get_size(jo);                   // return 4\njson_object_get_int(jo, \"int_key\");         // return 0\njson_object_remove(jo, \"int_key\");\njson_object_get_size(jo);                   // return 3\n\njson_object_to_string(jo);                  // return {\"null_key\":null, \"bool_key\":false, \"string_key\":\"hello world!\"}\n\njson_object_t *jo2 = json_object_create_from_string(\"{\\\"null_key\\\":null, \\\"bool_key\\\":false, \\\"string_key\\\":\\\"hello world!\\\"}\");   // `\\\"` because \" is an escape char\n\n// jo content is completly equal to jo2 content\n\njson_object_destroy(jo);                    // destroy and return NULL\njson_object_destroy(jo2);\n```\n#### json array:\n```\n#include \u003cjson.h\u003e\n...\njson_array_t *ja = json_array_create();     // create\n\njson_array_put_int(ja, 0);\njson_array_put_int(ja, 2);\njson_array_put_object_at(ja, 1, json_object_create());\n\njson_array_get_size(ja);                    // return 3\n\njson_array_to_string(ja);                   // return [0, {}, 2]\n\njson_object_put_null(json_array_get_object(ja, 1), \"null_key\");\n\njson_array_to_string(ja);                   // return [0, {\"null_key\":null}, 2]\n\njson_array_remove(ja, 2);\n\njson_array_put_array_at(ja, 1, json_array_clone(ja));\n\njson_array_to_string(ja);                   // return [0, [0, {\"null_key\":null}], {\"null_key\":null}]\n\njson_array_destroy(ja);                     // destroy and return NULL\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskyf0l%2Fjson-library","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskyf0l%2Fjson-library","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskyf0l%2Fjson-library/lists"}