Object Instance luci.json
LuCI JSON-Library
Functions
| Decoder (customnull) | Create a new JSON-Decoder. |
| Decoder:get () | Get the decoded data packets after the rawdata has been sent to the sink. |
| Decoder:sink () | Create an LTN12 sink from the decoder object which accepts the JSON-Data. |
| Encoder (data, buffersize, fastescape) | Create a new JSON-Encoder. |
| Encoder:source () | Create an LTN12 source providing the encoded JSON-Data. |
| null () | Null replacement function |
Functions
- Decoder (customnull)
-
Create a new JSON-Decoder.
Parameters
- customnull: Use luci.json.null instead of nil for decoding null
Return value:
JSON-Decoder - Decoder:get ()
-
Get the decoded data packets after the rawdata has been sent to the sink.
Return value:
Decoded data - Decoder:sink ()
-
Create an LTN12 sink from the decoder object which accepts the JSON-Data.
Return value:
LTN12 sink - Encoder (data, buffersize, fastescape)
-
Create a new JSON-Encoder.
Parameters
- data: Lua-Object to be encoded.
- buffersize: Blocksize of returned data source.
- fastescape: Use non-standard escaping (don't escape control chars)
Return value:
JSON-Encoder - Encoder:source ()
-
Create an LTN12 source providing the encoded JSON-Data.
Return value:
LTN12 source - null ()
-
Null replacement function
Return value:
null