timo / json_fast

a naive imperative json parser in perl6, to evaluate performance against JSON::Tiny
Artistic License 2.0
27 stars 20 forks source link

Stringification of a Buf is not done with 'Str' #71

Open davehayes opened 4 years ago

davehayes commented 4 years ago

I found this exception in my logs:

Died because of the exception:
    Stringification of a Buf is not done with 'Str'.
    The 'decode' method should be used to convert Buf to a Str.
      in sub from-json at /rw/home/dave/.rakubrew/versions/moar-2020.05.1/install/share/perl6/site/sources/CF9890C71AE8A56077B5CB316932D72C4F622655 (JSON::Fast) line 669
      in method get at /rw/home/dave/.rakubrew/versions/moar-2020.05.1/install/share/perl6/site/sources/9A32FD61B375BC9C16658D298F3EDFC0BF07B976 (Matrix::Client::Requester) line 29
      in method sync at /rw/home/dave/.rakubrew/versions/moar-2020.05.1/install/share/perl6/site/sources/21F88B5335208B63586F8168E3B6793E42ABEEE4 (Matrix::Client) line 183
      in method sync at /rw/home/dave/.rakubrew/versions/moar-2020.05.1/install/share/perl6/site/sources/21F88B5335208B63586F8168E3B6793E42ABEEE4 (Matrix::Client) line 178
      in block  at /rw/home/dave/.rakubrew/versions/moar-2020.05.1/install/share/perl6/site/sources/1DCA72658C23E63D648E8A1C9327A064E13175C3 (Matrix::Bot) line 97

I looked at the line it's complaining about but as I'm pretty new to Raku I've no idea what that does. Is this my issue or yours? :)

timo commented 4 years ago

depends on what we want it to do; when there's a buf, do you want it to show up as an array of integers? that's the simplest solution i can come up with. i'll have to look at Matrix::Client::Requester and Matrix::Bot to see why exactly it would have a buf in something that gets json-ified

davehayes commented 4 years ago

I am likely too new to Raku to advise here. My only comment would be that an untimely demise isn't a "least surprise". :)