Software /
code /
prosody
Comparison
util/json.lua @ 5396:9adde79c52b9
Merge 0.9->trunk
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 28 Mar 2013 09:31:29 -0400 |
parent | 5395:ec33d72a08b6 |
child | 5436:a4ba5819bf50 |
comparison
equal
deleted
inserted
replaced
5394:3d1de30fefec | 5396:9adde79c52b9 |
---|---|
144 return t_concat(t); | 144 return t_concat(t); |
145 end | 145 end |
146 function json.encode_ordered(obj) | 146 function json.encode_ordered(obj) |
147 local t = { ordered = true }; | 147 local t = { ordered = true }; |
148 simplesave(obj, t); | 148 simplesave(obj, t); |
149 return t_concat(t); | |
150 end | |
151 function json.encode_array(obj) | |
152 local t = {}; | |
153 arraysave(obj, t); | |
149 return t_concat(t); | 154 return t_concat(t); |
150 end | 155 end |
151 | 156 |
152 ----------------------------------- | 157 ----------------------------------- |
153 | 158 |