Debian Codegraph @

upstream/opensuse-tumbleweed/man1/json_pp.1

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
3 .\"
4 .\" Standard preamble:
5 .\" ========================================================================
6 .de Sp \" Vertical space (when we can't use .PP)
7 .if t .sp .5v
8 .if n .sp
9 ..
10 .de Vb \" Begin verbatim text
11 .ft CW
12 .nf
13 .ne \\$1
14 ..
15 .de Ve \" End verbatim text
16 .ft R
17 .fi
18 ..
19 .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
20 .ie n \{\
21 . ds C` ""
22 . ds C' ""
23 'br\}
24 .el\{\
25 . ds C`
26 . ds C'
27 'br\}
28 .\"
29 .\" Escape single quotes in literal strings from groff's Unicode transform.
30 .ie \n(.g .ds Aq \(aq
31 .el .ds Aq '
32 .\"
33 .\" If the F register is >0, we'll generate index entries on stderr for
34 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
35 .\" entries marked with X<> in POD. Of course, you'll have to process the
36 .\" output yourself in some meaningful fashion.
37 .\"
38 .\" Avoid warning from groff about undefined register 'F'.
39 .de IX
40 ..
41 .nr rF 0
42 .if \n(.g .if rF .nr rF 1
43 .if (\n(rF:(\n(.g==0)) \{\
44 . if \nF \{\
45 . de IX
46 . tm Index:\\$1\t\\n%\t"\\$2"
47 ..
48 . if !\nF==2 \{\
49 . nr % 0
50 . nr F 2
51 . \}
52 . \}
53 .\}
54 .rr rF
55 .\"
56 .\" Required to disable full justification in groff 1.23.0.
57 .if n .ds AD l
58 .\" ========================================================================
59 .\"
60 .IX Title "JSON_PP 1"
61 .TH JSON_PP 1 2026-03-09 "perl v5.42.1" "Perl Programmers Reference Guide"
62 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
63 .\" way too many mistakes in technical documents.
64 .if n .ad l
65 .nh
66 .SH NAME
67 json_pp \- JSON::PP command utility
68 .SH SYNOPSIS
69 .IX Header "SYNOPSIS"
70 .Vb 1
71 \& json_pp [\-v] [\-f from_format] [\-t to_format] [\-json_opt options_to_json1[,options_to_json2[,...]]]
72 .Ve
73 .SH DESCRIPTION
74 .IX Header "DESCRIPTION"
75 json_pp converts between some input and output formats (one of them is JSON).
76 This program was copied from json_xs and modified.
77 .PP
78 The default input format is json and the default output format is json with pretty option.
79 .SH OPTIONS
80 .IX Header "OPTIONS"
81 .SS \-f
82 .IX Subsection "-f"
83 .Vb 1
84 \& \-f from_format
85 .Ve
86 .PP
87 Reads a data in the given format from STDIN.
88 .PP
89 Format types:
90 .IP json 4
91 .IX Item "json"
92 as JSON
93 .IP eval 4
94 .IX Item "eval"
95 as Perl code
96 .SS \-t
97 .IX Subsection "-t"
98 Writes a data in the given format to STDOUT.
99 .IP null 4
100 .IX Item "null"
101 no action.
102 .IP json 4
103 .IX Item "json"
104 as JSON
105 .IP dumper 4
106 .IX Item "dumper"
107 as Data::Dumper
108 .SS \-json_opt
109 .IX Subsection "-json_opt"
110 options to JSON::PP
111 .PP
112 Acceptable options are:
113 .PP
114 .Vb 2
115 \& ascii latin1 utf8 pretty indent space_before space_after relaxed canonical allow_nonref
116 \& allow_singlequote allow_barekey allow_bignum loose escape_slash indent_length
117 .Ve
118 .PP
119 Multiple options must be separated by commas:
120 .PP
121 .Vb 1
122 \& Right: \-json_opt pretty,canonical
123 \&
124 \& Wrong: \-json_opt pretty \-json_opt canonical
125 .Ve
126 .SS \-v
127 .IX Subsection "-v"
128 Verbose option, but currently no action in fact.
129 .SS \-V
130 .IX Subsection "-V"
131 Prints version and exits.
132 .SH EXAMPLES
133 .IX Header "EXAMPLES"
134 .Vb 2
135 \& $ perl \-e\*(Aqprint q|{"foo":"あい","bar":1234567890000000000000000}|\*(Aq |\e
136 \& json_pp \-f json \-t dumper \-json_opt pretty,utf8,allow_bignum
137 \&
138 \& $VAR1 = {
139 \& \*(Aqbar\*(Aq => bless( {
140 \& \*(Aqvalue\*(Aq => [
141 \& \*(Aq0000000\*(Aq,
142 \& \*(Aq0000000\*(Aq,
143 \& \*(Aq5678900\*(Aq,
144 \& \*(Aq1234\*(Aq
145 \& ],
146 \& \*(Aqsign\*(Aq => \*(Aq+\*(Aq
147 \& }, \*(AqMath::BigInt\*(Aq ),
148 \& \*(Aqfoo\*(Aq => "\ex{3042}\ex{3044}"
149 \& };
150 \&
151 \& $ perl \-e\*(Aqprint q|{"foo":"あい","bar":1234567890000000000000000}|\*(Aq |\e
152 \& json_pp \-f json \-t dumper \-json_opt pretty
153 \&
154 \& $VAR1 = {
155 \& \*(Aqbar\*(Aq => \*(Aq1234567890000000000000000\*(Aq,
156 \& \*(Aqfoo\*(Aq => "\ex{e3}\ex{81}\ex{82}\ex{e3}\ex{81}\ex{84}"
157 \& };
158 .Ve
159 .SH "SEE ALSO"
160 .IX Header "SEE ALSO"
161 JSON::PP, json_xs
162 .SH AUTHOR
163 .IX Header "AUTHOR"
164 Makamaka Hannyaharamitu, <makamaka[at]cpan.org>
165 .SH "COPYRIGHT AND LICENSE"
166 .IX Header "COPYRIGHT AND LICENSE"
167 Copyright 2010 by Makamaka Hannyaharamitu
168 .PP
169 This library is free software; you can redistribute it and/or modify
170 it under the same terms as Perl itself.