# HG changeset patch # User Matthew Wild # Date 1457130424 0 # Node ID ee1f7e1e548c5af70e3174e0551c71bd28c33834 # Parent 161f9f163e37dcfe578a5eb812e9925effbb6d0e util.json: Fix encoding of json.null (bug introduced in bf1f09a5bcf7) diff -r 161f9f163e37 -r ee1f7e1e548c util/json.lua --- a/util/json.lua Fri Mar 04 22:17:38 2016 +0000 +++ b/util/json.lua Fri Mar 04 22:27:04 2016 +0000 @@ -145,7 +145,9 @@ function simplesave(o, buffer) local t = type(o); - if t == "number" then + if o == null then + t_insert(buffer, "null"); + elseif t == "number" then t_insert(buffer, tostring(o)); elseif t == "string" then stringsave(o, buffer);