diff --git a/pgmoon/json.lua b/pgmoon/json.lua index ecffd69..8e8acbd 100644 --- a/pgmoon/json.lua +++ b/pgmoon/json.lua @@ -13,7 +13,7 @@ encode_json = function(tbl, escape_literal) local enc if GetRedbeanVersion then enc = EncodeJson(tbl) - enc = enc:gsub("\\u0027", "''") + enc = enc:gsub("\\u0027", "'") else local json = require("cjson") enc = json.encode(tbl) diff --git a/pgmoon/json.moon b/pgmoon/json.moon index eb69a50..579b3ac 100644 --- a/pgmoon/json.moon +++ b/pgmoon/json.moon @@ -14,7 +14,7 @@ encode_json = (tbl, escape_literal) -> if GetRedbeanVersion enc = EncodeJson tbl - enc = enc\gsub "\\u0027", "''" + enc = enc\gsub "\\u0027", "'" else json = require "cjson" enc = json.encode tbl