1 USING: json.writer tools.test multiline json.reader json ;
4 { "false" } [ f >json ] unit-test
5 { "true" } [ t >json ] unit-test
6 { "null" } [ json-null >json ] unit-test
7 { "0" } [ 0 >json ] unit-test
8 { "102" } [ 102 >json ] unit-test
9 { "-102" } [ -102 >json ] unit-test
10 { "102.0" } [ 102.0 >json ] unit-test
11 { "102.5" } [ 102.5 >json ] unit-test
13 { "[1,\"two\",3.0]" } [ { 1 "two" 3.0 } >json ] unit-test
14 { <" {"US$":1.0,"EU€":1.5}"> } [ H{ { "US$" 1.0 } { "EU€" 1.5 } } >json ] unit-test
16 ! Random symbols are written simply as strings
18 { <" "testSymbol""> } [ testSymbol >json ] unit-test
20 [ { 0.5 } ] [ { 1/2 } >json json> ] unit-test