Closed skaji closed 9 years ago
498135a8df3986e80e1c552145aad6f39ecb19a0 addresses this; is it good enough?
@timo Thanks, you're fast! Yes, it works. I close this issue.
PS. This is not a related issue, but maybe should we care about 'null'?
> perl6 -MJSON::Fast -e 'my $a; to-json($a).say'
{
}
> perl6 -e 'my $a; to-json($a).say'
null
In #2, to-json function changed drastically.
In https://github.com/timo/json_fast/blob/master/lib/JSON/Fast.pm#L19, to-json checks whether $obj is array-like or not by
~~ Array
. ThenSeq
,List
, ... is not array-like andto-json(Seq)
does not work.I think we should check whether $obj is array-like or not by
multi to-json(Positional:D $obj)
as before.