summaryrefslogtreecommitdiffhomepage
path: root/documentation/api
diff options
context:
space:
mode:
Diffstat (limited to 'documentation/api')
-rw-r--r--documentation/api/modules/luci.jsonc.parser.html35
-rw-r--r--documentation/api/modules/luci.model.uci.html8
2 files changed, 42 insertions, 1 deletions
diff --git a/documentation/api/modules/luci.jsonc.parser.html b/documentation/api/modules/luci.jsonc.parser.html
index 4c19cf0e59..e8e145f437 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>&nbsp;()</td>
+ <td class="summary">
+
+Generate an ltn12-compatible sink.</td>
+ </tr>
+
+ <tr>
<td class="name" nowrap><a href="#parser.stringify">parser:stringify</a>&nbsp;(pretty)</td>
<td class="summary">
@@ -406,6 +413,34 @@ Nothing is returned.
+<dt><a name="parser.sink"></a><strong>parser:sink</strong>&nbsp;()</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>&nbsp;(pretty)</dt>
<dd>
diff --git a/documentation/api/modules/luci.model.uci.html b/documentation/api/modules/luci.model.uci.html
index 9e50d9900d..cf75aebccb 100644
--- a/documentation/api/modules/luci.model.uci.html
+++ b/documentation/api/modules/luci.model.uci.html
@@ -1119,6 +1119,12 @@ Name of created section
Set a value or create a named section.
+
+When invoked with three arguments <code>config</code>, <code>sectionname</code>, <code>sectiontype</code>,
+then a named section of the given type is created.
+
+When invoked with four arguments <code>config</code>, <code>sectionname</code>, <code>optionname</code> and
+<code>optionvalue</code> then the value of the specified option is set to the given value.
@@ -1138,7 +1144,7 @@ Set a value or create a named section.
</li>
<li>
- value: UCI value or nil if you want to create a section
+ value: UCI value or nothing if you want to create a section
</li>
</ul>