{"id":15722631,"url":"https://github.com/melsoft-games/defold-cjson","last_synced_at":"2025-05-13T03:56:18.667Z","repository":{"id":49951782,"uuid":"179145876","full_name":"Melsoft-Games/defold-cjson","owner":"Melsoft-Games","description":"Defold NE for cjson encode and decode JSON","archived":false,"fork":false,"pushed_at":"2019-06-06T15:15:37.000Z","size":689,"stargazers_count":23,"open_issues_count":0,"forks_count":8,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-13T03:56:07.466Z","etag":null,"topics":["defold","defold-library","defold-module"],"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/Melsoft-Games.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":"2019-04-02T19:35:00.000Z","updated_at":"2025-02-04T02:09:20.000Z","dependencies_parsed_at":"2022-07-30T23:47:57.545Z","dependency_job_id":null,"html_url":"https://github.com/Melsoft-Games/defold-cjson","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/Melsoft-Games%2Fdefold-cjson","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Melsoft-Games%2Fdefold-cjson/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Melsoft-Games%2Fdefold-cjson/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Melsoft-Games%2Fdefold-cjson/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Melsoft-Games","download_url":"https://codeload.github.com/Melsoft-Games/defold-cjson/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253870856,"owners_count":21976612,"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":["defold","defold-library","defold-module"],"created_at":"2024-10-03T22:08:41.657Z","updated_at":"2025-05-13T03:56:18.646Z","avatar_url":"https://github.com/Melsoft-Games.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"![](docs/logo.png)\n\n# Defold-CJSON\n\nDefold-CJSON [Native Extension](https://www.defold.com/manuals/extensions/) for the [Defold Game Engine](https://www.defold.com) \n\nThis extension allow you encode lua table to JSON and decode JSON to lua table in native part\n\n\n## Platforms\n\n* **iOS**\n* **Android**\n* **MacOS**\n* **Windows**\n\n## Setup\n\nYou can use the Defold-CJSON extension in your own project by adding this project as a [Defold library dependency](https://www.defold.com/manuals/libraries/). Open your game.project file and in the dependencies field under project add:\n\n\u003e https://github.com/Melsoft-Games/defold-cjson/archive/master.zip\n\nOr point to the ZIP file of a [specific release](https://github.com/Melsoft-Games/defold-cjson/releases).\n\n## API\n\n#### `cjson.encode(lua_table)`\nreturn encoded lua table to json string\n\n#### `cjson.decode(valid_json)`\nreturn parsed lua_table \n\n**Note**: *json must be valid, or cjson will throw error. You can wrap it with pcall, or change extension and call cjson safe_decode from lua-cjson lib*\n\n\n## Benchmark\n**rxlua** - pure lua JSON encode/decode [implementation](https://github.com/rxi/json.lua)\n\ntime in ms\n\n| Json: | 4KB | 971KB | 1.8MB |\n| -- | -- | -- | -- |\n| defold decode  |  0  \t\t|  0.032  \t|  0.075  |\n|  -- \t\t\t |  --  \t| --   \t\t| --\t\t|\n|  rxlua encode  |  0  \t\t|  0.0734  \t|  0.148  |\n|  rxlua decode  |  0.0003  |  0.0308  \t|  0.051  |\n|  -- \t\t\t |  --  \t| --   \t\t| --\t\t|\n|  cjson encode  |  0  \t\t|  0.0057  \t|  0.0122  |\n|  cjson decode  |  0  \t\t|  0.0066  \t|  0.0117  |\n\n\n\n## License, Authors\n*MIT license*\nThis NE wrapped by [Denis Smirnov](https://github.com/trouble1337)\n\nOriginal module: [lua-cjson](https://github.com/mpx/lua-cjson)\n[License](https://github.com/mpx/lua-cjson/blob/master/LICENSE)\n\n## Issues and suggestions\n\nIf you have any issues, questions or suggestions please [create an issue](https://github.com/Melsoft-Games/defold-cjson/issues) or contact me: insality@gmail.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmelsoft-games%2Fdefold-cjson","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmelsoft-games%2Fdefold-cjson","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmelsoft-games%2Fdefold-cjson/lists"}