Mister Spy Say ="Hello Kids ... :D" ___ ____ _ _____ | \/ (_) | | / ___| | . . |_ ___| |_ ___ _ __ \ `--. _ __ _ _ | |\/| | / __| __/ _ \ '__| `--. \ '_ \| | | | | | | | \__ \ || __/ | /\__/ / |_) | |_| | \_| |_/_|___/\__\___|_| \____/| .__/ \__, | | | __/ | |_| |___/ Bot Mister Spy V3
Mister Spy

Mister Spy

Current Path : /usr/local/share/man/man1/
Upload File :
Current File : //usr/local/share/man/man1/json_xs.1

.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings.  \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
.    ds -- \(*W-
.    ds PI pi
.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
.    ds L" ""
.    ds R" ""
.    ds C` ""
.    ds C' ""
'br\}
.el\{\
.    ds -- \|\(em\|
.    ds PI \(*p
.    ds L" ``
.    ds R" ''
.    ds C`
.    ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\"
.\" If the F register is >0, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD.  Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.\"
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
.nr rF 0
.if \n(.g .if rF .nr rF 1
.if (\n(rF:(\n(.g==0)) \{\
.    if \nF \{\
.        de IX
.        tm Index:\\$1\t\\n%\t"\\$2"
..
.        if !\nF==2 \{\
.            nr % 0
.            nr F 2
.        \}
.    \}
.\}
.rr rF
.\" ========================================================================
.\"
.IX Title "JSON_XS 1"
.TH JSON_XS 1 "2018-11-15" "perl v5.32.1" "User Contributed Perl Documentation"
.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH "NAME"
json_xs \- JSON::XS commandline utility
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
.Vb 1
\&   json_xs [\-v] [\-f inputformat] [\-t outputformat]
.Ve
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
\&\fIjson_xs\fR converts between some input and output formats (one of them is
\&\s-1JSON\s0).
.PP
The default input format is \f(CW\*(C`json\*(C'\fR and the default output format is
\&\f(CW\*(C`json\-pretty\*(C'\fR.
.SH "OPTIONS"
.IX Header "OPTIONS"
.IP "\-v" 4
.IX Item "-v"
Be slightly more verbose.
.IP "\-f fromformat" 4
.IX Item "-f fromformat"
Read a file in the given format from \s-1STDIN.\s0
.Sp
\&\f(CW\*(C`fromformat\*(C'\fR can be one of:
.RS 4
.IP "json \- a json text encoded, either utf\-8, utf16\-be/le, utf32\-be/le" 4
.IX Item "json - a json text encoded, either utf-8, utf16-be/le, utf32-be/le"
.PD 0
.IP "cbor \- \s-1CBOR\s0 (\s-1RFC 7049,\s0 \s-1CBOR::XS\s0), a kind of binary \s-1JSON\s0" 4
.IX Item "cbor - CBOR (RFC 7049, CBOR::XS), a kind of binary JSON"
.IP "storable \- a Storable frozen value" 4
.IX Item "storable - a Storable frozen value"
.IP "storable-file \- a Storable file (Storable has two incompatible formats)" 4
.IX Item "storable-file - a Storable file (Storable has two incompatible formats)"
.IP "bencode \- use Convert::Bencode, if available (used by torrent files, among others)" 4
.IX Item "bencode - use Convert::Bencode, if available (used by torrent files, among others)"
.IP "clzf \- Compress::LZF format (requires that module to be installed)" 4
.IX Item "clzf - Compress::LZF format (requires that module to be installed)"
.ie n .IP "eval \- evaluate the given code as (non\-utf\-8) Perl, basically the reverse of ""\-t dump""" 4
.el .IP "eval \- evaluate the given code as (non\-utf\-8) Perl, basically the reverse of ``\-t dump''" 4
.IX Item "eval - evaluate the given code as (non-utf-8) Perl, basically the reverse of -t dump"
.IP "yaml \- \s-1YAML\s0 format (requires that module to be installed)" 4
.IX Item "yaml - YAML format (requires that module to be installed)"
.IP "string \- do not attempt to decode the file data" 4
.IX Item "string - do not attempt to decode the file data"
.ie n .IP "none \- nothing is read, creates an ""undef"" scalar \- mainly useful with ""\-e""" 4
.el .IP "none \- nothing is read, creates an \f(CWundef\fR scalar \- mainly useful with \f(CW\-e\fR" 4
.IX Item "none - nothing is read, creates an undef scalar - mainly useful with -e"
.RE
.RS 4
.RE
.IP "\-t toformat" 4
.IX Item "-t toformat"
.PD
Write the file in the given format to \s-1STDOUT.\s0
.Sp
\&\f(CW\*(C`toformat\*(C'\fR can be one of:
.RS 4
.IP "json, json\-utf\-8 \- json, utf\-8 encoded" 4
.IX Item "json, json-utf-8 - json, utf-8 encoded"
.PD 0
.IP "json-pretty \- as above, but pretty-printed" 4
.IX Item "json-pretty - as above, but pretty-printed"
.IP "json\-utf\-16le, json\-utf\-16be \- little endian/big endian utf\-16" 4
.IX Item "json-utf-16le, json-utf-16be - little endian/big endian utf-16"
.IP "json\-utf\-32le, json\-utf\-32be \- little endian/big endian utf\-32" 4
.IX Item "json-utf-32le, json-utf-32be - little endian/big endian utf-32"
.IP "cbor \- \s-1CBOR\s0 (\s-1RFC 7049,\s0 \s-1CBOR::XS\s0), a kind of binary \s-1JSON\s0" 4
.IX Item "cbor - CBOR (RFC 7049, CBOR::XS), a kind of binary JSON"
.IP "cbor-packed \- \s-1CBOR\s0 using extensions to make it smaller" 4
.IX Item "cbor-packed - CBOR using extensions to make it smaller"
.IP "storable \- a Storable frozen value in network format" 4
.IX Item "storable - a Storable frozen value in network format"
.IP "storable-file \- a Storable file in network format (Storable has two incompatible formats)" 4
.IX Item "storable-file - a Storable file in network format (Storable has two incompatible formats)"
.IP "bencode \- use Convert::Bencode, if available (used by torrent files, among others)" 4
.IX Item "bencode - use Convert::Bencode, if available (used by torrent files, among others)"
.IP "clzf \- Compress::LZF format" 4
.IX Item "clzf - Compress::LZF format"
.IP "yaml \- \s-1YAML::XS\s0 format" 4
.IX Item "yaml - YAML::XS format"
.IP "dump \- Data::Dump" 4
.IX Item "dump - Data::Dump"
.IP "dumper \- Data::Dumper" 4
.IX Item "dumper - Data::Dumper"
.IP "string \- writes the data out as if it were a string" 4
.IX Item "string - writes the data out as if it were a string"
.ie n .IP "none \- nothing gets written, mainly useful together with ""\-e""" 4
.el .IP "none \- nothing gets written, mainly useful together with \f(CW\-e\fR" 4
.IX Item "none - nothing gets written, mainly useful together with -e"
.PD
Note that Data::Dumper doesn't handle self-referential data structures
correctly \- use \*(L"dump\*(R" instead.
.RE
.RS 4
.RE
.IP "\-e code" 4
.IX Item "-e code"
Evaluate perl code after reading the data and before writing it out again
\&\- can be used to filter, create or extract data. The data that has been
written is in \f(CW$_\fR, and whatever is in there is written out afterwards.
.SH "EXAMPLES"
.IX Header "EXAMPLES"
.Vb 1
\&   json_xs \-t none <isitreally.json
.Ve
.PP
\&\*(L"\s-1JSON\s0 Lint\*(R" \- tries to parse the file \fIisitreally.json\fR as \s-1JSON\s0 \- if it
is valid \s-1JSON,\s0 the command outputs nothing, otherwise it will print an
error message and exit with non-zero exit status.
.PP
.Vb 1
\&   <src.json json_xs >pretty.json
.Ve
.PP
Prettify the \s-1JSON\s0 file \fIsrc.json\fR to \fIdst.json\fR.
.PP
.Vb 1
\&   json_xs \-f storable\-file <file
.Ve
.PP
Read the serialised Storable file \fIfile\fR and print a human-readable \s-1JSON\s0
version of it to \s-1STDOUT.\s0
.PP
.Vb 1
\&   json_xs \-f storable\-file \-t yaml <file
.Ve
.PP
Same as above, but write \s-1YAML\s0 instead (not using \s-1JSON\s0 at all :)
.PP
.Vb 1
\&   json_xs \-f none \-e \*(Aq$_ = [1, 2, 3]\*(Aq
.Ve
.PP
Dump the perl array as \s-1UTF\-8\s0 encoded \s-1JSON\s0 text.
.PP
.Vb 1
\&   <torrentfile json_xs \-f bencode \-e \*(Aq$_ = join "\en", map @$_, @{$_\->{"announce\-list"}}\*(Aq \-t string
.Ve
.PP
Print the tracker list inside a torrent file.
.PP
.Vb 1
\&   lwp\-request http://cpantesters.perl.org/show/JSON\-XS.json | json_xs
.Ve
.PP
Fetch the cpan-testers result summary \f(CW\*(C`JSON::XS\*(C'\fR and pretty-print it.
.SH "AUTHOR"
.IX Header "AUTHOR"
Copyright (C) 2008 Marc Lehmann <json@schmorp.de>

Mr. DellatioNx196 GaLers xh3LL Backd00r 1.0, Coded By Mr. DellatioNx196 - Bogor BlackHat