From fc9fed6a9d5532fb3b2a66e4cbd44b99ab76080f Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Fri, 2 Jan 2026 02:42:21 +0300 Subject: [PATCH] bugfix... Signed-off-by: Alex A. Naanou --- serialize.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/serialize.js b/serialize.js index a79b96b..dc0f25a 100644 --- a/serialize.js +++ b/serialize.js @@ -403,7 +403,10 @@ module.eJSON = { if(j == str.length && str[j-1] != match){ this.error('Unexpected end of input wile looking fot "'+ match +'".', str, i, line) } - return [ str.slice(i+1, j), j+1, line ] }, + // NOTE: this is cheating -- instead of dancing around and + // replicating the full functionality of JSON.parse(..) we + // are simply falling back on it, as we did when serializing. + return [ JSON.parse(`"${str.slice(i+1, j)}"`), j+1, line ] }, identifier: function(state, path, match, str, i, line){ debug.lex('identifier', str, i, line) if(!/[a-zA-Z_]/.test(str[i])){