fix(json): add multi-platform JSON library compatibility
- Add flexible JSON detection (cjson preferred, dkjson fallback) - Update main.lua and mail.lua with found_cjson detection - Update start.sh to check both JSON libraries - Enables furt to run on Arch Linux without manual patches - Maintains API compatibility with existing cjson usage Fixes #108
This commit is contained in:
parent
785283950f
commit
78e8dedf8e
3 changed files with 13 additions and 5 deletions
|
|
@ -3,7 +3,10 @@
|
|||
-- Dragons@Work Digital Sovereignty Project
|
||||
|
||||
local socket = require("socket")
|
||||
local cjson = require("cjson")
|
||||
local found_cjson, cjson = pcall(require, 'cjson')
|
||||
if not found_cjson then
|
||||
cjson = require('dkjson')
|
||||
end
|
||||
|
||||
-- Load modules
|
||||
local Auth = require("src.auth")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue