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
Data::Printer::Profile::JSON(3) User Contributed Perl Documentation Data::Printer::Profile::JSON(3)

Data::Printer::Profile::JSON - dump variables in JSON format

While loading Data::Printer:

    use DDP profile => 'JSON';

While asking for a print:

    p $var, profile => 'JSON';

or in your ".dataprinter" file:

    profile = JSON

This profile outputs your variables in JSON format. It's not nearly as efficient as a regular JSON module, but it may be useful, specially if you're changing the format directly in your .dataprinter.

JSON is a super simple format that allows scalar, hashes and arrays. It doesn't support many types that could be present on Perl data structures, such as functions, globs and circular references. When printing those types, whenever possible, this module will stringify the result.

Objects are also not shown, but their internal data structure is exposed.

This module also attempts to render Regular expressions as plain JS regexes. While not directly supported in JSON, it should be parseable.

Data::Printer JSON::MaybeXS>
2021-02-03 perl v5.32.1

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.