{"id":13896344,"url":"https://github.com/harningt/luajson","last_synced_at":"2025-07-17T12:33:15.265Z","repository":{"id":435687,"uuid":"56627","full_name":"harningt/luajson","owner":"harningt","description":"JSON parser/encoder for Lua Parses JSON using LPEG for speed and flexibility. Depending on parser/encoder options, various values are preserved as best as possible.","archived":false,"fork":false,"pushed_at":"2023-10-10T22:57:06.000Z","size":470,"stargazers_count":249,"open_issues_count":9,"forks_count":48,"subscribers_count":20,"default_branch":"master","last_synced_at":"2024-08-07T18:39:25.324Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.eharning.us/wiki/luajson/","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/harningt.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2008-09-26T04:40:02.000Z","updated_at":"2024-08-02T16:40:01.000Z","dependencies_parsed_at":"2023-10-11T01:08:18.371Z","dependency_job_id":null,"html_url":"https://github.com/harningt/luajson","commit_stats":{"total_commits":282,"total_committers":5,"mean_commits":56.4,"dds":0.04255319148936165,"last_synced_commit":"b5e3c9bf73cb7908e246230e991d853aaa35552d"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harningt%2Fluajson","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harningt%2Fluajson/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harningt%2Fluajson/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harningt%2Fluajson/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/harningt","download_url":"https://codeload.github.com/harningt/luajson/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226265521,"owners_count":17597222,"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":[],"created_at":"2024-08-06T18:02:51.099Z","updated_at":"2024-11-25T02:30:22.182Z","avatar_url":"https://github.com/harningt.png","language":"Lua","funding_links":[],"categories":["Lua","资源","Resources"],"sub_categories":["Parsing and Serialization"],"readme":"## LuaJSON\nJSON Parser/Constructor for Lua\n\n### Author:\nThomas Harning Jr. \u003charningt@gmail.com\u003e\n\n### Source code:\nhttp://repo.or.cz/luajson\n\n### Bug reports:\nhttp://github.com/harningt/luajson\nharningt@gmail.com\n\n### Requirements\nLua 5.1, 5.2, 5.3, LuaJIT 2.0, or LuaJIT 2.1\nLPeg (Tested with 0.7, 0.8, 0.9, 0.10, 0.12rc2, 1.0.1)\nFor regressionTest:\n\tlfs (Tested with 1.6.3)\n### For lunit-tests:\nlunitx \u003e= 0.8\n\n### NOTE:\nLPeg 0.11 may not work - it crashed during my initial tests,\nit is not in the test matrix.\n\n### Lua versions tested recently:\n* Lua 5.1.5\n* Lua 5.2.4\n* Lua 5.3.4\n* LuaJIT-2.0.4\n* LuaJIT-2.1.0-beta2\n\n### License\nAll-but tests: MIT-style, See LICENSE for details\ntests/*:       Public Domain / MIT - whichever is least restrictive\n\n### Module/Function overview:\n### json.encode (callable module referencing json.encode.encode)\n___encode ( value : ANY-valid )___\n\nTakes in a JSON-encodable value and returns the JSON-encoded text\nValid input types:\n* table\n* array-like table (spec below)\n* string\n* number\n* boolean\n* 'null' - represented by json.util.null\n\nTable keys (string,number,boolean) are encoded as strings, others are erroneus\nTable values are any valid input-type\nArray-like tables are converted into JSON arrays...\nPosition 1 maps to JSON Array position 0\n\n### json.decode (callable module referencing json.decode.decode)\n___decode (data : string, strict : optional boolean)___\n\nTakes in a string of JSON data and converts it into a Lua object\nIf 'strict' is set, then the strict JSON rule-set is used\n\n### json.util\n#### Useful utilities\n___null___\n\nReference value to represent 'null' in a well-defined way to\nallow for null values to be inserted into an array/table\n\n   undefined\n\nReference value to represent 'undefined' in a well-defined\nway to allow for undefined values to be inserted into an\narray/table.\n\n   IsArray (t : ANY)\n\nChecks if the passed in object is a plain-old-array based on\nwhether or not is has the LuaJSON array metatable attached\nor the custom __is_luajson_array metadata key stored.\n\n   InitArray(t: table)\n\nSets the 'array' marker metatable to guarantee the table is\nrepresented as a LuaJSON array type.\n\n   isCall (t : ANY)\n\nChecks if the passed in object is a LuaJSON call object.\n\n   buildCall(name : string, ... parameters)\n\nBuilds a call object with the given name and set of parameters.\nThe name is stored in the 'name' field and the parameters in\nthe 'parameters' field as an array.\n\n#### Additional Utilities\n   clone (t : table)\n\nShallow-clones a table by iterating using pairs and assigning.\n\n___printValue (tab : ANY, name : string)\n\nrecursively prints out all object values - if duplicates found, reference printed\n\n___merge (t : table, ... : tables)\n\nShallow-merges a sequence of tables onto table t by iterating over each using\npairs and assigning.\n\n#### Internal Utilities - Not to Use\n   decodeCall\n   doOptionMerge\n\n### Attribution\nparsing test suite from JSON_checker project of http://www.json.org/\nNo listed license for these files in their package.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharningt%2Fluajson","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fharningt%2Fluajson","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharningt%2Fluajson/lists"}