diff options
author | Jan-Philipp Litza <janphilipp@litza.de> | 2015-09-01 16:17:23 +0200 |
---|---|---|
committer | Jan-Philipp Litza <janphilipp@litza.de> | 2015-09-04 12:21:30 +0200 |
commit | 5335f225374c7ed993348d15b5018411dc776bab (patch) | |
tree | 1a09ce68eac08178a96c162bb1f75528c398bb54 /applications/luci-app-samba | |
parent | f0083abed10e8a397ebe9e62801e3b5d536ba7b6 (diff) |
luci-lib-jsonc: Add ltn12-compatible sink factory
To use the luci-lib-jsonc parser as sink for an ltn12 pump (for example
from stdin), the following code will now do:
require 'luci.ltn12'
require 'luci.jsonc'
local parser = luci.jsonc.new()
luci.ltn12.pump.all(luci.ltn12.source.file(io.input()), parser:sink())
print(parser:get())
Signed-off-by: Jan-Philipp Litza <janphilipp@litza.de>
Diffstat (limited to 'applications/luci-app-samba')
0 files changed, 0 insertions, 0 deletions