Closed timo closed 6 years ago
I'm going to look at this because:
[jonathan@coriolanus JSON-Marshal]$ perl6 -e 'use JSON::Fast; say to-json({foo => Str})'
Cannot unbox a type object
in sub str-escape at sources/A670982EBE56A59B3A7611E194FB56A852C763B3 (JSON::Fast) line 5
in sub to-json at sources/A670982EBE56A59B3A7611E194FB56A852C763B3 (JSON::Fast) line 16
in sub to-json at sources/A670982EBE56A59B3A7611E194FB56A852C763B3 (JSON::Fast) line 39
in block <unit> at -e line 1
It's interfering with my ability to switch to JSON::Fast
Still fails for (Int)
, (Rat)
, (Num)
which are processed before the return 'null' if not $obj.defined
check. I'd recommend moving it above those. One could argue about (Bool
-- Should that be null
or false
? It might break things if you change it now, so I'd recommend still leaving that as it is.
Can I :+1: a surprising two and a half year later close?
sure. sorry for not keeping this issue tracker updated as i changed things :(
to-json(Any) and my $foo; to-json($foo) should both generate "null".