debian man page for mojo::json::pointer

Query: mojo::json::pointer

OS: debian

Section: 3pm

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

Mojo::JSON::Pointer(3pm)				User Contributed Perl Documentation				  Mojo::JSON::Pointer(3pm)

NAME
Mojo::JSON::Pointer - JSON Pointers
SYNOPSIS
use Mojo::JSON::Pointer; my $p = Mojo::JSON::Pointer->new; say $p->get({foo => [23, 'bar']}, '/foo/1'); say 'Contains "/foo".' if $p->contains({foo => [23, 'bar']}, '/foo');
DESCRIPTION
Mojo::JSON::Pointer implements JSON Pointers as described in http://tools.ietf.org/html/draft-ietf-appsawg-json-pointer <http://tools.ietf.org/html/draft-ietf-appsawg-json-pointer>.
METHODS
"contains" my $success = $p->contains($data, '/foo/1'); Check if data structure contains a value that can be identified with the given JSON Pointer. # True $p->contains({foo => 'bar', baz => [4, 5, 6]}, '/foo'); $p->contains({foo => 'bar', baz => [4, 5, 6]}, '/baz/2'); # False $p->contains({foo => 'bar', baz => [4, 5, 6]}, '/bar'); $p->contains({foo => 'bar', baz => [4, 5, 6]}, '/baz/9'); "get" my $value = $p->get($data, '/foo/bar'); Extract value identified by the given JSON Pointer. # "bar" $p->get({foo => 'bar', baz => [4, 5, 6]}, '/foo'); # "4" $p->get({foo => 'bar', baz => [4, 5, 6]}, '/baz/0'); # "6" $p->get({foo => 'bar', baz => [4, 5, 6]}, '/baz/2');
SEE ALSO
Mojolicious, Mojolicious::Guides, <http://mojolicio.us>. perl v5.14.2 2012-09-05 Mojo::JSON::Pointer(3pm)
Related Man Pages
mojo::dom::css(3pm) - debian
mojo::dom::html(3pm) - debian
mojo::json::pointer(3pm) - debian
mojo::url(3pm) - debian
mojolicious::routes::match(3pm) - debian
Similar Topics in the Unix Linux Community
Remove if the above line matches pattern
Unix How to combine find and cp
Write string variables to file
URL extraction from JSON file
Convert String to an Array using shell scripting in JSON file.