Skip to content

Commit

Permalink
allow non-Arrays that are Positional to serialize like arrays, sirrob…
Browse files Browse the repository at this point in the history
…ert++
  • Loading branch information
moritz committed Aug 23, 2012
1 parent 871d1a7 commit dc01336
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/JSON/Tiny.pm
Expand Up @@ -29,7 +29,7 @@ multi to-json(Str:D $d) {
.subst(/<-[\c32..\c126]>/, { ord(~$_).fmt('\u%04x') }, :g)
~ '"'
}
multi to-json(Array:D $d) {
multi to-json(Positional:D $d) {
return '[ '
~ $d.map(&to-json).join(', ')
~ ' ]';
Expand Down

0 comments on commit dc01336

Please sign in to comment.