++ed by:
FAYLAND BIFFEN DATA DMOL PREACTION

116 PAUSE user(s)
144 non-PAUSE user(s).

Sebastian Riedel

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-pbryan-zyp-json-pointer-02. Note that this module is EXPERIMENTAL and might change without warning!

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.

get

  my $value = $p->get($data, '/foo/bar');

Extract value identified by the given JSON Pointer.

SEE ALSO

Mojolicious, Mojolicious::Guides, http://mojolicio.us.