You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This sets up the JSON encoding/decoding so you can use a configurable
library, using cjson as the default, but allowing optional usage of
dkjson for a pure-lua library (in environments like ARM where cjson may
be more difficult to get setup).
We keep cjson as the default (since we assume its bundled with
OpenResty), and don't add an explicit dependency for dkjson (since it's
not available on OPM, and trying to keep that in mind for future
installation). But if you manually add dkjson then the dkjson adapter
should work.
See #85
The JSON adapter to use for encoding and decoding JSON. Defaults to using [cjson](https://github.com/openresty/lua-cjson), which is bundled with OpenResty installations and should probably be used in most cases. However, an adapter using the pure Lua [dkjson](https://luarocks.org/modules/dhkolf/dkjson) can be used for environments where cjson may not be available (you will need to manually install the dkjson dependency via luarocks to use this adapter).
280
+
281
+
cjson and dkjson json adapters are supplied, but custom external adapters may also be specified (the value simply needs to be on the `lua_package_path`).
0 commit comments