diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2015-12-17 02:36:45 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2015-12-17 02:36:45 +0100 |
commit | e19098d0623e96690e65539b36c59965ae1373d5 (patch) | |
tree | d119b6321ece019fbedc711c13bf0b28e85a1055 /documentation/api | |
parent | 31816e92f109e0c534f176ca1e79b032917c876c (diff) | |
parent | 5335f225374c7ed993348d15b5018411dc776bab (diff) |
Merge pull request #462 from jplitza/jsonc-sink
luci-lib-jsonc: Add ltn12-compatible sink factory
Diffstat (limited to 'documentation/api')
-rw-r--r-- | documentation/api/modules/luci.jsonc.parser.html | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/documentation/api/modules/luci.jsonc.parser.html b/documentation/api/modules/luci.jsonc.parser.html index 4c19cf0e5..e8e145f43 100644 --- a/documentation/api/modules/luci.jsonc.parser.html +++ b/documentation/api/modules/luci.jsonc.parser.html @@ -234,6 +234,13 @@ Put Lua data into the parser.</td> </tr> <tr> + <td class="name" nowrap><a href="#parser.sink">parser:sink</a> ()</td> + <td class="summary"> + +Generate an ltn12-compatible sink.</td> + </tr> + + <tr> <td class="name" nowrap><a href="#parser.stringify">parser:stringify</a> (pretty)</td> <td class="summary"> @@ -406,6 +413,34 @@ Nothing is returned. +<dt><a name="parser.sink"></a><strong>parser:sink</strong> ()</dt> +<dd> + + +Generate an ltn12-compatible sink. + + + + + + +<h3>Usage:</h3> +<pre>parser = luci.jsonc.new() +ltn12.pump.all(ltn12.source.file(io.input()), parser:sink()) +print(parser:get())</pre> + + + +<h3>Return value:</h3> +Returns a function that can be used as an ltn12 sink. + + + +</dd> + + + + <dt><a name="parser.stringify"></a><strong>parser:stringify</strong> (pretty)</dt> <dd> |