---@meta cjson -- Hand-written, unlike the rest of lua/api: the implementation is lua-cjson under -- native/src/vendor/cjson, so there are no binding annotations to generate from. -- Depth is capped at 32 in native/src/bindings/lib/cjson.cpp, because decoding -- recurses on the C stack and the upstream default of 1000 assumes a server. -- -- Both functions raise on bad input rather than returning nil plus a message, so -- a response from the network is worth a pcall. ---@class CJsonLib local cjson = {} ---The value a JSON null decodes to, distinct from nil so a key survives it. cjson.null = nil ---Parses JSON text. ---@param text string ---@return any value Tables, strings, numbers, booleans, or cjson.null. function cjson.decode(text) end ---Serializes plain Lua data as JSON. ---@param value any Sequences become arrays; every other table becomes an object. ---@return string text function cjson.encode(value) end return cjson