Merge pull request #980 from NvrBst/pull-request-upnp_description
[project/luci.git] / libs / luci-lib-json / luasrc / json.luadoc
1 ---[[
2 LuCI JSON-Library
3
4 @cstyle instance
5 ]]
6 module "luci.json"
7
8 ---[[
9 Directly decode a JSON string
10
11 @class function
12 @name decode
13 @param json JSON-String
14 @return Lua object
15 ]]
16
17 ---[[
18 Direcly encode a Lua object into a JSON string.
19
20 @class function
21 @name encode
22 @param obj Lua Object
23 @return JSON string
24 ]]
25
26 ---[[
27 Null replacement function
28
29 @class function
30 @name null
31 @return null
32 ]]
33
34 ---[[
35 Create a new JSON-Encoder.
36
37 @class  function
38 @name   Encoder
39 @param data                     Lua-Object to be encoded.
40 @param buffersize       Blocksize of returned data source.
41 @param fastescape       Use non-standard escaping (don't escape control chars)
42 @return JSON-Encoder
43 ]]
44
45 ---[[
46 Create an LTN12 source providing the encoded JSON-Data.
47
48 @class function
49 @name Encoder.source
50 @return LTN12 source
51 ]]
52
53 ---[[
54 Create a new JSON-Decoder.
55
56 @class  function
57 @name   Decoder
58 @param customnull Use luci.json.null instead of nil for decoding null
59 @return JSON-Decoder
60 ]]
61
62 ---[[
63 Create an LTN12 sink from the decoder object which accepts the JSON-Data.
64
65 @class function
66 @name Decoder.sink
67 @return LTN12 sink
68 ]]
69
70 ---[[
71 Get the decoded data packets after the rawdata has been sent to the sink.
72
73 @class function
74 @name Decoder.get
75 @return Decoded data
76 ]]
77
78 ---[[
79 Create a new Active JSON-Decoder.
80
81 @class  function
82 @name   ActiveDecoder
83 @param   customnull     Use luci.json.null instead of nil for decoding null
84 @return  Active JSON-Decoder
85 ]]
86
87 ---[[
88 Fetches one JSON-object from given source
89
90 @class function
91 @name ActiveDecoder.get
92 @return Decoded object
93 ]]
94