Handbook
Glossary
json-number ( char stream -- num char )
Vocabulary
json
.
private
Inputs
char
an
object
stream
an
object
Outputs
num
an
object
char
an
object
Definition
USING:
combinators
io
kernel
math.parser
sequences
strings
;
IN:
json.private
:
json-number
( char stream -- num char )
[
1string
]
[
" \t\r\n,:}]"
swap
stream-read-until
]
bi*
[
append
{
{
"Infinity"
[
1/0.
]
}
{
"-Infinity"
[
-1/0.
]
}
{
"NaN"
[
0/0.
]
}
{
"-0"
[
-0.0
]
}
[
[
string>number
]
[
not-a-json-number
]
?unless
]
}
case
]
dip
;