Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

from-json breaks on preceeding whitespace #7

Closed
sirrobert opened this Issue · 1 comment

3 participants

@sirrobert
$ perl6
> use JSON::Tiny;
Nil
> my $json = ' {"a":1}';
> from-json $json;
Any()
> from-json $json.trim;
("a" => 1).hash
> 
@masak masak closed this issue from a commit
@masak masak [JSON::Tiny] trim input before parsing it
This used to return "Any" because of the leading whitespace:

$ nom -e 'use JSON::Tiny; say from-json(q[   {}]).perl'
Any

But it now works:

$ nom -e 'use JSON::Tiny; say from-json(q[   {}]).perl'
{}

Closes #7.
121fff4
@masak masak closed this in 121fff4
@moritz
Owner

also relevant: commit a7910f1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.