Software /
code /
prosody
Comparison
util/serialization.lua @ 1135:355f9487ab38
util/serialization: Fixed serialization formatting
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Fri, 08 May 2009 01:06:45 +0500 |
parent | 1128:b2e548344d61 |
child | 1523:841d61be198f |
comparison
equal
deleted
inserted
replaced
1134:3b1809910773 | 1135:355f9487ab38 |
---|---|
51 func(t, "}"); | 51 func(t, "}"); |
52 elseif type(o) == "boolean" then | 52 elseif type(o) == "boolean" then |
53 func(t, (o and "true" or "false")); | 53 func(t, (o and "true" or "false")); |
54 else | 54 else |
55 log("error", "cannot serialize a %s: %s", type(o), debug_traceback()) | 55 log("error", "cannot serialize a %s: %s", type(o), debug_traceback()) |
56 func(t, "nil,\n"); | 56 func(t, "nil"); |
57 end | 57 end |
58 end | 58 end |
59 | 59 |
60 function append(t, o) | 60 function append(t, o) |
61 _simplesave(o, 1, t, t.write or t_insert); | 61 _simplesave(o, 1, t, t.write or t_insert); |