NAME
HTML::Native::JSON - embedded JSON data
SYNOPSIS
use HTML::Native::JSON;
my $json = HTML::Native::JSON->new ( {
start => 4,
end => 7
} );
print $json;
# prints "<script type="application/json">{"start":4,"end":7}</script>"
DESCRIPTION
An HTML::Native::JSON object represents a piece of inline JSON data, usable by JavaScript code such as the jQuery metadata plugin.
METHODS
new()
$elem = HTML::Native::JSON->new ( <data> );
Create a new HTML::Native::JSON object, representing a single <script>
element.