]> gitweb.factorcode.org Git - factor.git/commitdiff
json.writer: don't escape spaces, thats weird.
authorJohn Benediktsson <mrjbq7@gmail.com>
Thu, 25 Dec 2014 16:39:53 +0000 (08:39 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Thu, 25 Dec 2014 16:39:53 +0000 (08:39 -0800)
basis/json/writer/writer-tests.factor
basis/json/writer/writer.factor

index 8f46af197a60792c110bad3670961d5858e8d6c8..c43840d7f87511ee25fe78d32b2ebe2a72e69c65 100644 (file)
@@ -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
index ec654299c12c7d8f1c0fddcf79e6d428348f9bd3..7a6771e02bee158c422475b309da799aa7faeb92 100644 (file)
@@ -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 ] }