.--- J8 Case "[ u'hi']" Id.J8_LBracket '[' - Id.Ignored_Space ' ' - ..--- J8 Case '{"hi": "bye \\n"}' Id.J8_LBrace '{' - Id.J8_String '"hi"' 'hi' Id.J8_Colon ':' - Id.Ignored_Space ' ' - Id.J8_String '"bye \\n"' 'bye \n' Id.J8_RBrace '}' - Id.Eol_Tok '' - --- J8 Case "{u'unicode': b'bytes \\y1f \\yff'}" Id.J8_LBrace '{' - Id.J8_String "u'unicode'" 'unicode' Id.J8_Colon ':' - Id.Ignored_Space ' ' - Id.J8_String "b'bytes \\y1f \\yff'" 'bytes \x1f \xff' Id.J8_RBrace '}' - Id.Eol_Tok '' - --- J8 Case '{"mu \\u03BC \\u0001":b\'mu \\u{03bc} \\u{2620}\'' Id.J8_LBrace '{' - Id.J8_String '"mu \\u03BC \\u0001"' 'mu \xce\xbc \x01' Id.J8_Colon ':' - Id.J8_String "b'mu \\u{03bc} \\u{2620}'" 'mu \xce\xbc \xe2\x98\xa0' Id.Eol_Tok '' - --- J8 Case '{"x": [1, 2, 3.14, true]}' Id.J8_LBrace '{' - Id.J8_String '"x"' 'x' Id.J8_Colon ':' - Id.Ignored_Space ' ' - Id.J8_LBracket '[' - Id.J8_Int '1' - Id.J8_Comma ',' - Id.Ignored_Space ' ' - Id.J8_Int '2' - Id.J8_Comma ',' - Id.Ignored_Space ' ' - Id.J8_Float '3.14' - Id.J8_Comma ',' - Id.Ignored_Space ' ' - Id.J8_Bool 'true' - Id.J8_RBracket ']' - Id.J8_RBrace '}' - Id.Eol_Tok '' - --- J8 Case '\n [\n 1e9, 1e-9, -1e9, -1E-9, 42\n ]\n ' Id.Ignored_Newline '\n' - Id.Ignored_Space ' ' - Id.J8_LBracket '[' - Id.Ignored_Newline '\n' - Id.Ignored_Space ' ' - Id.J8_Float '1e9' - Id.J8_Comma ',' - Id.Ignored_Space ' ' - Id.J8_Float '1e-9' - Id.J8_Comma ',' - Id.Ignored_Space ' ' - Id.J8_Float '-1e9' - Id.J8_Comma ',' - Id.Ignored_Space ' ' - Id.J8_Float '-1E-9' - Id.J8_Comma ',' - Id.Ignored_Space ' ' - Id.J8_Int '42' - Id.Ignored_Newline '\n' - Id.Ignored_Space ' ' - Id.J8_RBracket ']' - Id.Ignored_Newline '\n' - Id.Ignored_Space ' ' - Id.Eol_Tok '' - --- J8 Case '"\x01"' --- J8 Case '"\x1f"' .--- J8 Case 'true # comment' Id.J8_Bool 'true' - Id.Ignored_Space ' ' - Id.Ignored_Comment '# comment' - Id.Eol_Tok '' - --- J8 Case 'truez8 # identifier' Id.J8_Identifier 'truez8' - Id.Ignored_Space ' ' - Id.Ignored_Comment '# identifier' - Id.Eol_Tok '' - --- J8 Case 'truez8> # symbol' Id.J8_Identifier 'truez8' - Id.J8_Operator '>' - Id.Ignored_Space ' ' - Id.Ignored_Comment '# symbol' - Id.Eol_Tok '' - --- J8 Case '(<= 1 3) # less than' Id.J8_LParen '(' - Id.J8_Operator '<=' - Id.Ignored_Space ' ' - Id.J8_Int '1' - Id.Ignored_Space ' ' - Id.J8_Int '3' - Id.J8_RParen ')' - Id.Ignored_Space ' ' - Id.Ignored_Comment '# less than' - Id.Eol_Tok '' - --- J8 Case '(<- 123 (Token))' Id.J8_LParen '(' - Id.J8_Operator '<-' - Id.Ignored_Space ' ' - Id.J8_Int '123' - Id.Ignored_Space ' ' - Id.J8_LParen '(' - Id.J8_Identifier 'Token' - Id.J8_RParen ')' - Id.J8_RParen ')' - Id.Eol_Tok '' - --- J8 Case '(Node left:(-> 123))' Id.J8_LParen '(' - Id.J8_Identifier 'Node' - Id.Ignored_Space ' ' - Id.J8_Identifier 'left' - Id.J8_Colon ':' - Id.J8_LParen '(' - Id.J8_Operator '->' - Id.Ignored_Space ' ' - Id.J8_Int '123' - Id.J8_RParen ')' - Id.J8_RParen ')' - Id.Eol_Tok '' - ...len 3 len 3 len 2 len 2 len 3 len 3 Utf8Encode case 'e' 101 Utf8Encode case '\xc4\x80' 256 Utf8Encode case '\xe1\x88\xb4' 4660 Utf8Encode case '\xf0\xa0\x80\x80' 131072 Single quotes aren't part of JSON; you may want 'json8 read' (line 1, offset 2-4: "[ u'hi']") (value.Dict d:[Dict]) J8 strings can't have unescaped ASCII control chars (line 1, offset 0-2: '"\x01"') J8 strings can't have unescaped ASCII control chars (line 1, offset 0-2: '"\x1f"') (unquoted) (nvalue.List items:[(nvalue.Symbol s:unquoted)]) (command.Simple) (nvalue.List items: [ (nvalue.List items:[(nvalue.Symbol s:.) (nvalue.Symbol s:command) (nvalue.Symbol s:Simple)]) ] ) (f x) (nvalue.List items:[(nvalue.Symbol s:f) (nvalue.Symbol s:x)]) (f 42 "hi") (nvalue.List items:[(nvalue.Symbol s:f) (nvalue.Int i:42) (nvalue.Str s:hi)]) ((-> obj method) (. obj field)) (nvalue.List items: [ (nvalue.List items:[(nvalue.Symbol s:"->") (nvalue.Symbol s:obj) (nvalue.Symbol s:method)]) (nvalue.List items:[(nvalue.Symbol s:.) (nvalue.Symbol s:obj) (nvalue.Symbol s:field)]) ] ) (@ x123 (Token "foo")) (nvalue.List items: [ (nvalue.Symbol s:"@") (nvalue.Symbol s:x123) (nvalue.List items:[(nvalue.Symbol s:Token) (nvalue.Str s:foo)]) ] ) (: key "value") (nvalue.List items:[(nvalue.Symbol s:":") (nvalue.Symbol s:key) (nvalue.Str s:value)]) (. x123) (nvalue.List items:[(nvalue.Symbol s:.) (nvalue.Symbol s:x123)]) (Token key:"value" k2:"v2") (nvalue.List items: [ (nvalue.Symbol s:Token) (nvalue.List items:[(nvalue.Symbol s:":") (nvalue.Symbol s:key) (nvalue.Str s:value)]) (nvalue.List items:[(nvalue.Symbol s:":") (nvalue.Symbol s:k2) (nvalue.Str s:v2)]) ] ) (key !x123) (nvalue.List items: [(nvalue.List items:[(nvalue.Symbol s:"!") (nvalue.Symbol s:key) (nvalue.Symbol s:x123)])] ) (<-) (nvalue.List items:[(nvalue.Symbol s:"<-")]) (<- 1 b'hi') (nvalue.List items:[(nvalue.Symbol s:"<-") (nvalue.Int i:1) (nvalue.Str s:hi)]) (<- 1 'hi' (f [1 2 3])) (nvalue.List items: [ (nvalue.Symbol s:"<-") (nvalue.Int i:1) (nvalue.Str s:hi) (nvalue.List items: [ (nvalue.Symbol s:f) (nvalue.List items:[(nvalue.Int i:1) (nvalue.Int i:2) (nvalue.Int i:3)]) ] ) ] ) [] (nvalue.List items:[]) [42] (nvalue.List items:[(nvalue.Int i:42)]) [42 43] (nvalue.List items:[(nvalue.Int i:42) (nvalue.Int i:43)]) [42 ["a" "b"]] (nvalue.List items:[(nvalue.Int i:42) (nvalue.List items:[(nvalue.Str s:a) (nvalue.Str s:b)])]) 42 (nvalue.Int i:42) "hi" (nvalue.Str s:hi) Unexpected trailing input (line 1, offset 16-17: 'ple))') Unexpected EOF while parsing J8 (line 1, offset 1-1: '(') Unexpected EOF while parsing J8 (line 1, offset 10-10: 'ield') Unexpected EOF while parsing J8 (line 1, offset 5-5: 'obj.') Invalid token while parsing J8: Id.J8_RParen (line 1, offset 5-6: 'obj.)') Unexpected EOF while parsing J8 (line 1, offset 6-6: 'bj.+') Invalid token while parsing J8: Id.J8_RParen (line 1, offset 6-7: 'bj.+)') Invalid token while parsing J8: Id.J8_RParen (line 1, offset 6-7: 'bj.[)') PREFIX (: key "value") (nvalue.List items:[(nvalue.Symbol s:":") (nvalue.Symbol s:key) (nvalue.Str s:value)]) INFIX key: "value" (nvalue.List items:[(nvalue.Symbol s:":") (nvalue.Symbol s:key) (nvalue.Str s:value)]) PREFIX ((: k "v") (: k2 "v2")) (nvalue.List items: [ (nvalue.List items:[(nvalue.Symbol s:":") (nvalue.Symbol s:k) (nvalue.Str s:v)]) (nvalue.List items:[(nvalue.Symbol s:":") (nvalue.Symbol s:k2) (nvalue.Str s:v2)]) ] ) INFIX (k: "v" k2: "v2") (nvalue.List items: [ (nvalue.List items:[(nvalue.Symbol s:":") (nvalue.Symbol s:k) (nvalue.Str s:v)]) (nvalue.List items:[(nvalue.Symbol s:":") (nvalue.Symbol s:k2) (nvalue.Str s:v2)]) ] ) PREFIX (@ "str" x123) (nvalue.List items:[(nvalue.Symbol s:"@") (nvalue.Str s:str) (nvalue.Symbol s:x123)]) INFIX "str" @ x123 (nvalue.List items:[(nvalue.Symbol s:"@") (nvalue.Str s:str) (nvalue.Symbol s:x123)]) PREFIX ((! a b) c) (nvalue.List items: [ (nvalue.List items:[(nvalue.Symbol s:"!") (nvlen 2 len 2 len 2 len 2 len 3 len 3 len 2 len 2 . ---------------------------------------------------------------------- Ran 8 tests in 0.007s OK alue.Symbol s:a) (nvalue.Symbol s:b)]) (nvalue.Symbol s:c) ] ) INFIX ( a ! b c) (nvalue.List items: [ (nvalue.List items:[(nvalue.Symbol s:"!") (nvalue.Symbol s:a) (nvalue.Symbol s:b)]) (nvalue.Symbol s:c) ] ) PREFIX (c (! a b)) (nvalue.List items: [ (nvalue.Symbol s:c) (nvalue.List items:[(nvalue.Symbol s:"!") (nvalue.Symbol s:a) (nvalue.Symbol s:b)]) ] ) INFIX ( c a ! b ) (nvalue.List items: [ (nvalue.Symbol s:c) (nvalue.List items:[(nvalue.Symbol s:"!") (nvalue.Symbol s:a) (nvalue.Symbol s:b)]) ] ) PREFIX (. (. obj field1) field2) (nvalue.List items: [ (nvalue.Symbol s:.) (nvalue.List items:[(nvalue.Symbol s:.) (nvalue.Symbol s:obj) (nvalue.Symbol s:field1)]) (nvalue.Symbol s:field2) ] ) INFIX obj.field1.field2 (nvalue.List items: [ (nvalue.Symbol s:.) (nvalue.Symbol s:obj) (nvalue.List items:[(nvalue.Symbol s:.) (nvalue.Symbol s:field1) (nvalue.Symbol s:field2)]) ] ) PREFIX ((-> obj method) (. obj field)) (nvalue.List items: [ (nvalue.List items:[(nvalue.Symbol s:"->") (nvalue.Symbol s:obj) (nvalue.Symbol s:method)]) (nvalue.List items:[(nvalue.Symbol s:.) (nvalue.Symbol s:obj) (nvalue.Symbol s:field)]) ] ) INFIX (obj->method obj.field1) (nvalue.List items: [ (nvalue.List items:[(nvalue.Symbol s:"->") (nvalue.Symbol s:obj) (nvalue.Symbol s:method)]) (nvalue.List items:[(nvalue.Symbol s:.) (nvalue.Symbol s:obj) (nvalue.Symbol s:field1)]) ] )