Changeset

5395:ec33d72a08b6

util.json: Add json.encode_array() (thanks B)
author Matthew Wild <mwild1@gmail.com>
date Thu, 28 Mar 2013 09:31:07 -0400
parents 5393:57c4964eff0b
children 5396:9adde79c52b9 5397:ed55a48270be
files util/json.lua
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/util/json.lua	Thu Mar 28 12:49:19 2013 +0100
+++ b/util/json.lua	Thu Mar 28 09:31:07 2013 -0400
@@ -148,6 +148,11 @@
 	simplesave(obj, t);
 	return t_concat(t);
 end
+function json.encode_array(obj)
+	local t = {};
+	arraysave(obj, t);
+	return t_concat(t);
+end
 
 -----------------------------------