From 167f4e789c8110ca07b29a90907d001cb198278d Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Thu, 25 Dec 2014 08:39:53 -0800 Subject: [PATCH] json.writer: don't escape spaces, thats weird. --- basis/json/writer/writer-tests.factor | 1 + basis/json/writer/writer.factor | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/basis/json/writer/writer-tests.factor b/basis/json/writer/writer-tests.factor index 8f46af197a..c43840d7f8 100644 --- a/basis/json/writer/writer-tests.factor +++ b/basis/json/writer/writer-tests.factor @@ -10,6 +10,7 @@ IN: json.writer.tests { "102.0" } [ 102.0 >json ] unit-test { "102.5" } [ 102.5 >json ] unit-test { "0.5" } [ 1/2 >json ] unit-test +{ """\"hello world\"""" } [ "hello world" >json ] unit-test { "[1,\"two\",3.0]" } [ { 1 "two" 3.0 } >json ] unit-test { """{"US$":1.0,"EU€":1.5}""" } [ H{ { "US$" 1.0 } { "EU€" 1.5 } } >json ] unit-test diff --git a/basis/json/writer/writer.factor b/basis/json/writer/writer.factor index ec654299c1..7a6771e02b 100644 --- a/basis/json/writer/writer.factor +++ b/basis/json/writer/writer.factor @@ -53,7 +53,6 @@ M: string stream-json-print { CHAR: \f [ "\\f" over stream-write ] } { CHAR: \n [ "\\n" over stream-write ] } { CHAR: \r [ "\\r" over stream-write ] } - { CHAR: \s [ "\\s" over stream-write ] } { CHAR: \t [ "\\t" over stream-write ] } { 0x2028 [ "\\u2028" over stream-write ] } { 0x2029 [ "\\u2029" over stream-write ] }