NAME
JSON::JOM::Object - represents an object in a JOM structure
DESCRIPTION
JOM objects have the following built-in methods. Other methods are available in JOM plugins.
typeof
- returns the string 'HASH'.rootNode
- a reference to the root node of the JOM structure.isRootNode
- boolean; is this the root node of the JOM structure?parentNode
- a reference to the parent of this node in the JOM structure.nodePath
- a JSON::Path-compatible string pointing to this node within the JOM structure.nodeIndex
- the array index or object key of the parentNode where this node is located.meta
- returns a hashref containing metadata about this node. This is intended for use by plugins.
Note, the following should always be true for any JOM node $this
:
$this->isRootNode
or $this->parentNode->typeof eq 'ARRAY'
&& $this->parentNode->[ $this->nodeIndex ] == $this
or $this->parentNode->typeof eq 'HASH'
&& $this->parentNode->{ $this->nodeIndex } == $this
BUGS
Please report any bugs to http://rt.cpan.org/.
SEE ALSO
JSON::JOM, JSON::JOM::Plugins.
AUTHOR
Toby Inkster <tobyink@cpan.org>.
COPYRIGHT
Copyright 2010 Toby Inkster
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.