Data::P...e::JSON(3)
β¨ NAME β¨
Data::Printer::Profile::JSON β dump variables in JSON format. Okay bestie, this is the Data::P...e::JSON(3) page (User Contributed Perl Documentation, hiii π), and it is literally all about yeeting your variables into JSON π
πΈ SYNOPSIS πΈ
While loading Data::Printer:
use DDP profile => 'JSON';
While asking for a print:
p $var, profile => 'JSON';
or in your .dataprinter file:
profile = JSON
π DESCRIPTION π
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 β¨
π¦ CAVEATS π¦
JSON is, like, a super simple format β it allows scalar, hashes and arrays, periodt π It has zero support for a bunch of types that could show up on Perl data structures, such as functions, globs and circular references. When printing those types, this module will stringify the result whenever possible.
Objects also don't get shown, but their internal data structure is exposed π
This module also tries to render Regular expressions as plain JS regexes. That's not directly supported in JSON, but it should be parseable π§
π SEE ALSO π
Data::PrinterJSON::MaybeXS>β and yes, the original SEE ALSO line is literallyData::Printer JSON::MaybeXS>with that trailing>, bestie, iykyk π
Signing off from the footer, bestie: perl v5.42.0, dated 2024-01-23, and yep β Data::P...e::JSON(3) one more time for the vibe check ππ
π¦ where this page comes from
- opensuse-leap 16.0: perl-Data-Printer 1.002001-bp160.1.11 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms