GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Template::Plugin::JSON(3) User Contributed Perl Documentation Template::Plugin::JSON(3)

Template::Plugin::JSON - Adds a .json vmethod for all TT values.

version 0.08

        [% USE JSON ( pretty => 1 ) %];
        <script type="text/javascript">
                var foo = [% foo.json %];
        </script>
        or read in JSON
        [% USE JSON %]
        [% data = JSON.json_decode(json) %]
        [% data.thing %]

This plugin provides a ".json" vmethod to all value types when loaded. You can also decode a json string back to a data structure.

It will load the JSON::MaybeXS module, which will use Cpanel::JSON::XS when possible and fall back to JSON::PP otherwise.

Any options on the USE line are passed through to the JSON object, much like "to_json" in Cpanel::JSON::XS.

JSON::MaybeXS, Template::Plugin

Bugs may be submitted through the RT bug tracker <https://rt.cpan.org/Public/Dist/Display.html?Name=Template-Plugin-JSON> (or bug-Template-Plugin-JSON@rt.cpan.org <mailto:bug-Template-Plugin-JSON@rt.cpan.org>).

יובל קוג'מן (Yuval Kogman) <nothingmuch@woobling.org>

  • Neil Bowers <neil@bowers.com>
  • Karen Etheridge <ether@cpan.org>
  • Graham Barr <gbarr@pobox.com>
  • Leo Lapworth <leo@cuckoo.org>
  • perigrin <perigrin@cpan.org>

This software is Copyright (c) 2006 by Yuval Kogman.

This is free software, licensed under:

  The MIT (X11) License
2019-03-07 perl v5.40.2

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.