Handbook
Glossary
dump-tnetstring ( data -- string )
Vocabulary
tnetstrings
.
private
Inputs
data
an
object
Outputs
string
an
object
Definition
USING:
assocs
combinators
kernel
math
sequences
strings
;
IN:
tnetstrings.private
:
dump-tnetstring
( data -- string )
{
{
[
dup
boolean?
]
[
dump-bool
]
}
{
[
dup
number?
]
[
dump-number
]
}
{
[
dup
string?
]
[
dump-string
]
}
{
[
dup
sequence?
]
[
dump-list
]
}
{
[
dup
assoc?
]
[
dump-dict
]
}
[
"Can't serialize object"
throw
]
}
cond
;