{ "name": "cjson", "version": "1.7.19", "summary": "cJSON: a small JSON parser and printer in C", "category": "library", "license": "MIT", "homepage": "https://github.com/DaveGamble/cJSON", "source": { "url": "https://github.com/DaveGamble/cJSON/archive/refs/tags/v1.7.19.tar.gz", "sha256": "7fa616e3046edfa7a28a32d5f9eacfd23f92900fe1f8ccd988c1662f30454562" }, "watch": {"kind": "github-tag", "repo": "DaveGamble/cJSON"}, "deps": [], "env_packages": [ "cmake", "ninja-build" ], "static": true, "nss": false, "check": "t=$(mktemp -d) && check_lib libcjson cjson/cJSON.h 'cJSON *j = cJSON_Parse(\"{\\\"name\\\":\\\"bvs\\\",\\\"list\\\":[1,2,3]}\"); cJSON *l = cJSON_GetObjectItemCaseSensitive(j, \"list\"); char *s; int bad; cJSON_AddNumberToObject(j, \"n\", 42); s = cJSON_PrintUnformatted(j); printf(\"cJSON %s: %s\\n\", cJSON_Version(), s); bad = !cJSON_IsArray(l) || cJSON_GetArraySize(l) != 3 || strcmp(s, \"{\\\"name\\\":\\\"bvs\\\",\\\"list\\\":[1,2,3],\\\"n\\\":42}\"); cJSON_free(s); cJSON_Delete(j); return bad' > \"$t/lib\" && echo 'cJSON 1.7.19: an object with an array parsed, a number added and printed back as one line, through check_lib'" }