1Data::Printer::Profile:U:sJeSrONC(o3n)tributed Perl DocuDmaetnat:a:tPiroinnter::Profile::JSON(3)
2
3
4
6 Data::Printer::Profile::JSON - dump variables in JSON format
7
9 While loading Data::Printer:
10
11 use DDP profile => 'JSON';
12
13 While asking for a print:
14
15 p $var, profile => 'JSON';
16
17 or in your ".dataprinter" file:
18
19 profile = JSON
20
22 This profile outputs your variables in JSON format. It's not nearly as
23 efficient as a regular JSON module, but it may be useful, specially if
24 you're changing the format directly in your .dataprinter.
25
27 JSON is a super simple format that allows scalar, hashes and arrays. It
28 doesn't support many types that could be present on Perl data
29 structures, such as functions, globs and circular references. When
30 printing those types, whenever possible, this module will stringify the
31 result.
32
33 Objects are also not shown, but their internal data structure is
34 exposed.
35
36 This module also attempts to render Regular expressions as plain JS
37 regexes. While not directly supported in JSON, it should be parseable.
38
40 Data::Printer JSON::MaybeXS>
41
42
43
44perl v5.34.0 2022-01-21 Data::Printer::Profile::JSON(3)