You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi guys, I am trying to run JSON parser (yason:parse) with flexi-streams:in-memory-stream directly, because (yason:parse) can accept string steam input directly.
Then SBCL gives me the error when I did it. After checking the code of yason::parse and the error message, I found there are two generic functions of SBCL that needed to be implemented: SB-GRAY:STREAM-READ-CHAR and SB-GRAY:STREAM-PEEK-CHAR
Then yason:parse works fine with flexi-streams:in-memory-stream (at least now).
Do you guys trying to implement peek-char for flexi-streams:in-memory-stream? My code just work, I am not sure I met all hidden details of flexi-streams:in-memory-stream. It would be nice if flexi-stream has peek-char natively.
Thanks
The text was updated successfully, but these errors were encountered:
I think this issue should be closed. in-memory-stream is explicitly a binary stream with no support for characters.
To get characters, a flexi-stream needs to be used on top of the in-memory-stream:
Hi guys, I am trying to run JSON parser
(yason:parse)
withflexi-streams:in-memory-stream
directly, because(yason:parse)
can accept string steam input directly.Then SBCL gives me the error when I did it. After checking the code of yason::parse and the error message, I found there are two generic functions of SBCL that needed to be implemented:
SB-GRAY:STREAM-READ-CHAR
andSB-GRAY:STREAM-PEEK-CHAR
So I tried to implement by code:
Then
yason:parse
works fine withflexi-streams:in-memory-stream
(at least now).Do you guys trying to implement
peek-char
forflexi-streams:in-memory-stream
? My code just work, I am not sure I met all hidden details offlexi-streams:in-memory-stream
. It would be nice ifflexi-stream
haspeek-char
natively.Thanks
The text was updated successfully, but these errors were encountered: