pull/10/merge
spiiin 2018-04-22 18:16:18 +00:00 committed by GitHub
commit 7f27d8b939
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -111,13 +111,17 @@ local function encode_number(val)
return string.format("%.14g", val) return string.format("%.14g", val)
end end
local function encode_bool(val)
return tostring(val)
end
local type_func_map = { local type_func_map = {
[ "nil" ] = encode_nil, [ "nil" ] = encode_nil,
[ "table" ] = encode_table, [ "table" ] = encode_table,
[ "string" ] = encode_string, [ "string" ] = encode_string,
[ "number" ] = encode_number, [ "number" ] = encode_number,
[ "boolean" ] = tostring, [ "boolean" ] = encode_bool,
} }