Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 07b47fc13b
Fetching contributors…

Cannot retrieve contributors at this time

31 lines (27 sloc) 0.523 kb
#!/usr/bin/perl
use Test::More;
use JSON::SL;
my $input = "[ 5 ], [ 6 ], { \"foo\" : \"bar\" }";
my $p = JSON::SL->new();
$p->set_jsonpointer(["/^"]);
$p->feed($input);
my @res = $p->fetch();
my $exp = [
{
'Value' => 5,
'JSONPointer' => '/^',
'Path' => '/0'
},
{
'Value' => 6,
'JSONPointer' => '/^',
'Path' => '/0'
},
{
'Value' => 'bar',
'JSONPointer' => '/^',
'Path' => '/foo'
}
];
is_deeply(\@res, $exp);
done_testing();
Jump to Line
Something went wrong with that request. Please try again.