Stock Lua libraries on K5 includes JSON library.
Quote:
Originally Posted by /usr/lib/lua/json.lua
Code:
-- USAGE:
-- This module exposes two functions:
-- encode(o)
-- Returns the table / string / boolean / number / nil / json.null value as a JSON-encoded string.
-- decode(json_string)
-- Returns a Lua object populated with the data encoded in the JSON string json_string.
|
Code:
[root@kindle root]# lua
Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio
> require"json"
> print(json.encode({hello="world"}))
{"hello":"world"}
> print(json.decode('{"hello":"world"}').hello)
world
Also there is stock
/usr/lib/libcjson.so (
docs), if you have a time to write information extractor in C.