HTML::Native::JSON - embedded JSON data
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>"
An HTML::Native::JSON object represents a piece of inline JSON data, usable by JavaScript code such as the jQuery metadata plugin.
$elem = HTML::Native::JSON->new ( <data> );
Create a new HTML::Native::JSON object, representing a single <script> element.
<script>
To install HTML::Native, copy and paste the appropriate command in to your terminal.
cpanm
cpanm HTML::Native
CPAN shell
perl -MCPAN -e shell install HTML::Native
For more information on module installation, please visit the detailed CPAN module installation guide.