Mojo::JSON::Patch - JSON Patch
use Mojo::JSON::Patch;
my $patch = Mojo::JSON::Patch->new([{op => 'add', path => '/foo', value => 'bar'}]);
$patch->apply($document);
my $data = $patch->data;
Mojo::JSON::Patch is a partial implementation of RFC 6902. We do not support the specifications `test` operation at present.
Mojo::JSON::Patch implements the following attributes.
my $operations = $patch->operations;
$patch = $patch->operations([{op => 'add', path => '/foo', value => 'bar'}]);
RFC 6902 compliant JSON data structure containing the operations to apply.
my $data = $patch->data;
$patch = $patch->data({foo => 'bar'});
RFC 4627 compliant JSON data structure.
Mojo::JSON::Patch inherits all methods from Mojo::JSON::Pointer and implements the following new ones.
$patch = $patch->apply($document);
Apply "operations" to "data".
my $patch = Mojo::JSON::Patch->new;
my $patch = Mojo::JSON::Patch->new([{op => 'add', path => '/foo', value => 'bar'}]);
Build new Mojo::JSON::Patch object.
Mojolicious, Mojolicious::Guides, http://mojolicious.org, JSON::Validator.