luci-lib-json: support serializing userdata
authorJo-Philipp Wich <jo@mein.io>
Fri, 18 May 2018 14:59:16 +0000 (16:59 +0200)
committerJo-Philipp Wich <jo@mein.io>
Fri, 18 May 2018 14:59:16 +0000 (16:59 +0200)
commit09de5a74e13b225c2159bd62bef2563bd2a615c2
tree96561f7971c4c4b8ddfb2ae9505c94d12d0ffdb2
parent364c271a84210a841762beeb2dd0715cd7c2e240
luci-lib-json: support serializing userdata

Fixes the following error when attempting to serialize userdata objects:

    .../json.lua:81: attempt to call local 'parser' (a nil value)

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
libs/luci-lib-json/luasrc/json.lua