Changeset 2976
- Timestamp:
- 08/27/08 19:49:52 (5 years ago)
- Files:
-
- 1 modified
-
ff-luci/trunk/libs/json/luasrc/json.lua (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ff-luci/trunk/libs/json/luasrc/json.lua
r2956 r2976 56 56 local getmetatable = getmetatable 57 57 58 --- LuCI JSON-Library 58 59 module "luci.json" 59 60 … … 64 65 end 65 66 66 67 --- JSON-Encoder 68 -- @class module 69 -- @cstyle instance 70 -- @name luci.json.Encoder 67 71 Encoder = util.class() 68 72 69 73 --- Creates a new Encoder. 70 -- @param data Datato be encoded.71 -- @param buffersize B uffersize of returned data.74 -- @param data Lua-Object to be encoded. 75 -- @param buffersize Blocksize of returned data source. 72 76 -- @param fastescape Use non-standard escaping (don't escape control chars) 73 77 function Encoder.__init__(self, data, buffersize, fastescape) … … 80 84 end 81 85 82 --- Create an LTN12 source from the encoder object86 --- Create an LTN12 source providing the encoded JSON-Data. 83 87 -- @return LTN12 source 84 88 function Encoder.source(self) … … 208 212 209 213 210 214 --- JSON-Decoder 215 -- @class module 216 -- @cstyle instance 217 -- @name luci.json.Decoder 211 218 Decoder = util.class() 212 219 213 220 --- Create a new Decoder object. 214 -- @param customnull Use rluci.json.null instead of nil221 -- @param customnull Use luci.json.null instead of nil 215 222 function Decoder.__init__(self, customnull) 216 223 self.cnull = customnull … … 218 225 end 219 226 220 --- Create an LTN12 sink from the decoder object .227 --- Create an LTN12 sink from the decoder object which accepts the JSON-Data. 221 228 -- @return LTN12 sink 222 229 function Decoder.sink(self) … … 228 235 229 236 230 --- Get the decoded data packets 237 --- Get the decoded data packets after the rawdata has been sent to the sink. 231 238 -- @return Decoded data 232 239 function Decoder.get(self)
