You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
598 B
Racket
24 lines
598 B
Racket
#lang br
|
|
(require "json-elider.rkt"
|
|
br/ragg/support
|
|
rackunit)
|
|
|
|
(check-equal?
|
|
(syntax->datum
|
|
(parse (list "{"
|
|
(token 'ID "message")
|
|
":"
|
|
(token 'STRING "'hello world'")
|
|
"}")))
|
|
'(json (object (kvpair (json (string "'hello world'"))))))
|
|
|
|
|
|
(check-equal?
|
|
(syntax->datum
|
|
(parse "[[[{}]],[],[[{}]]]"))
|
|
'(json (array #\[ (json (array #\[ (json (array #\[ (json (object)) #\])) #\])) #\, (json (array #\[ #\])) #\, (json (array #\[ (json (array #\[ (json (object )) #\])) #\])) #\])))
|
|
|
|
|
|
|
|
|