{"id":15529947,"url":"https://github.com/hazzard993/cjson-types","last_synced_at":"2025-03-28T21:43:47.042Z","repository":{"id":97408420,"uuid":"298457534","full_name":"hazzard993/cjson-types","owner":"hazzard993","description":"TypeScript definitions for cjson (Lua library)","archived":false,"fork":false,"pushed_at":"2020-09-25T03:57:40.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-03T08:13:56.307Z","etag":null,"topics":["json-parser","lua","typescript-to-lua"],"latest_commit_sha":null,"homepage":"","language":null,"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/hazzard993.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-09-25T03:26:35.000Z","updated_at":"2020-09-25T03:57:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"91efb05e-2afd-4e80-98c4-f427f75531bb","html_url":"https://github.com/hazzard993/cjson-types","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/hazzard993%2Fcjson-types","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hazzard993%2Fcjson-types/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hazzard993%2Fcjson-types/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hazzard993%2Fcjson-types/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hazzard993","download_url":"https://codeload.github.com/hazzard993/cjson-types/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246106668,"owners_count":20724400,"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":["json-parser","lua","typescript-to-lua"],"created_at":"2024-10-02T11:20:33.235Z","updated_at":"2025-03-28T21:43:46.896Z","avatar_url":"https://github.com/hazzard993.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# CJSON Types\n\nTypeScript definitions for the [CJSON lua library](https://www.kyne.com.au/~mark/software/lua-cjson.php).\n\nHow to add the definitions via yarn:\n\n```sh\nyarn add hazzard993/cjson-types\n```\n\ntsconfig that could help with your TypeScriptToLua setup.\n\nThis allows `import * as cjson from \"cjson\";`.\n\n```json\n{\n  \"compilerOptions\": {\n    \"baseUrl\": \".\",\n    \"paths\": {\n      \"cjson\": [\"./node_modules/cjson-types/cjson\"]\n    }\n  }\n}\n```\n\n```ts\nimport * as cjson from \"cjson\";\nconst cjson2 = cjson.new();\n\ntext = cjson.encode(value);\nvalue = cjson.decode(text);\n\nsetting = cjson.decode_invalid_numbers(setting);\nsetting = cjson.encode_invalid_numbers(setting);\n\nkeep = cjson.encode_keep_buffer(keep);\n\ndepth = cjson.encode_max_depth(depth);\ndepth = cjson.decode_max_depth(depth);\n[convert, ratio, safe] = cjson.encode_sparse_array(convert, ratio, safe);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhazzard993%2Fcjson-types","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhazzard993%2Fcjson-types","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhazzard993%2Fcjson-types/lists"}