NAME

Device::Firewall::PaloAlto::JSON - JSON parent class for Device::Firewall::PaloAlto modules.

VERSION

version 0.1.8

SYNOPSIS

use parent qw(Device::Firewall::PaloAlto::JSON);

DESCRIPTION

This module should be used as a parent to allow the module to output a JSON representation of the object.

to_json

# Output the ARP table to STDOUT
$fw->op->arp_table->to_json;

# Output the interfaces to the file 'interfaces.json'
$fw->op->interfaces->to_json('interfaces.json');

pre_json_transform

A sub can chose to override this sub which gives it a chance to transform the data structures before it's output to JSON.

The returned data structure will be transformed directly to JSON.

If the sub isn't overridden, the default behaviour is to return an unblessed '$self'.

AUTHOR

Greg Foletta <greg@foletta.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2019 by Greg Foletta.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.