From 533a5899e3016d01a68048d2d2b05e861e5d4d51 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Thu, 28 Mar 2013 09:31:07 -0400 Subject: util.json: Add json.encode_array() (thanks B) --- util/json.lua | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'util') diff --git a/util/json.lua b/util/json.lua index efc602f0..abb87eab 100644 --- 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 ----------------------------------- -- cgit v1.2.3