Handbook
Glossary
write-json-assoc ( obj stream -- )
Vocabulary
json
.
private
Inputs
obj
an
object
stream
an
object
Outputs
None
Definition
USING:
assocs
io
json
kernel
namespaces
sequences
strings
;
IN:
json.private
::
write-json-assoc
( obj stream -- )
123 stream
stream-write1
obj
>alist
[
44 stream
stream-write1
]
json-friendly-keys?
get
json-coerce-keys?
get
[
[
[
json-friendly
]
when
]
curry
]
dip
[
[
json-coerce
]
when
]
curry
[
[
[
dup
string?
]
]
dip
]
dip
[
if
stream
stream-write-json
]
2curry
compose
[
[
first2
]
]
dip
[
[
58 stream
stream-write1
stream
stream-write-json
]
bi*
]
curry
compose
interleave
125 stream
stream-write1
;