projects
/
prosody.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
95b1b95
)
util.json: Add json.encode_array() (thanks B)
author
Matthew Wild
<mwild1@gmail.com>
Thu, 28 Mar 2013 13:31:07 +0000
(09:31 -0400)
committer
Matthew Wild
<mwild1@gmail.com>
Thu, 28 Mar 2013 13:31:07 +0000
(09:31 -0400)
util/json.lua
patch
|
blob
|
history
diff --git
a/util/json.lua
b/util/json.lua
index efc602f0ed7a183b064b5be7307e018c8977a212..abb87eabe827456b2c916672e22afeebabb5ec55 100644
(file)
--- a/
util/json.lua
+++ b/
util/json.lua
@@
-148,6
+148,11
@@
function json.encode_ordered(obj)
simplesave(obj, t);
return t_concat(t);
end
+function json.encode_array(obj)
+ local t = {};
+ arraysave(obj, t);
+ return t_concat(t);
+end
-----------------------------------