{"id":13513470,"url":"https://github.com/ohler55/ojc","last_synced_at":"2025-04-30T17:21:37.366Z","repository":{"id":17304195,"uuid":"20074732","full_name":"ohler55/ojc","owner":"ohler55","description":"Optimized JSON in C","archived":false,"fork":false,"pushed_at":"2024-04-24T21:40:21.000Z","size":596,"stargazers_count":34,"open_issues_count":1,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-30T18:11:59.940Z","etag":null,"topics":["callback","fast","json","json-elements","json-parsing","ojc","parser"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ohler55.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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":"2014-05-22T19:51:11.000Z","updated_at":"2024-11-28T16:29:22.000Z","dependencies_parsed_at":"2024-06-19T03:03:15.569Z","dependency_job_id":"db4da96c-7a1c-42a8-ab9c-64d5950ce299","html_url":"https://github.com/ohler55/ojc","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohler55%2Fojc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohler55%2Fojc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohler55%2Fojc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohler55%2Fojc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ohler55","download_url":"https://codeload.github.com/ohler55/ojc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251749115,"owners_count":21637456,"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":["callback","fast","json","json-elements","json-parsing","ojc","parser"],"created_at":"2024-08-01T05:00:27.201Z","updated_at":"2025-04-30T17:21:37.321Z","avatar_url":"https://github.com/ohler55.png","language":"C","funding_links":[],"categories":["C","Libraries"],"sub_categories":[],"readme":"# [![{}j](misc/ojc_comet.svg)](http://www.ohler.com/ojc) [![Build Status](https://img.shields.io/travis/ohler55/ojc/master.svg?logo=travis)](http://travis-ci.org/ohler55/ojc?branch=master)\n\nOptimized JSON in C\n\n## Description\n\nOptimized JSON in C (OjC), as the name implies, was written to provide\noptimized JSON handling. It is derived from the underlying C parser in\n[Oj](http://www.ohler.com/oj) and more recently\n[OjG](https://github.com/ohler55/ojg). The intended use is for\napplications that need the maximum performance when reading large JSON\ndocument from a file or socket.\n\nBesides being a true streaming parser OjC produces a structure that handles all\nJSON constructs. It does not use a Hash or Map to represent the JSON object type\nbut keeps all occurances of a pairs in the object element.\n\nMultiple JSON elements are allowed in a single stream or from a socket. A\ncallback mechanism is provided to return full JSON elements for each entry in a\nJSON stream.\n\n## Simple JSON Parsing Example\n\n```c\n#include \u003cstdio.h\u003e\n#include \"oj/oj.h\"\n\nint\nmain(int argc, char **argv) {\n    const char      *str =\"{\\\"num\\\": 12.34e567}\"\n    struct _ojErr   err = OJ_ERR_INIT;\n    ojVal           val;\n\n    if (NULL == (val = oj_parse_str(\u0026err, str, NULL))) {\n        printf(\"Parse error: %s at %d:%d\\n\", err.msg, err.line, err.col);\n    } else {\n        oj_destroy(val);\n    }\n    oj_cleanup();\n    return err.code;\n}\n```\n\nMore example can be be found in the [examples](examples) directory.\n\n## Benchmarks and Comparisons\n\nA comparison of OjC and simdjson is in the [compare](compare)\ndirectory with results in the [results.md](compare/results.md) file.\nFor a more entertaining comparison take a look at [OjC and Simdjson racing](misc/compete.md).\n\n## Documentation\n\n*Documentation*: http://www.ohler.com/ojc\n\n## Source\n\n*GitHub* *repo*: https://github.com/ohler55/ojc\n\n## Releases\n\nSee [CHANGELOG](CHANGELOG.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fohler55%2Fojc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fohler55%2Fojc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fohler55%2Fojc/lists"}