{
    "content": [
        {
            "type": "text",
            "text": "# cpanel_json_xs (man)\n\n## NAME\n\ncpaneljsonxs - Cpanel::JSON::XS commandline utility\n\n## SYNOPSIS\n\ncpaneljsonxs [-v] [-f inputformat] [-t outputformat]\n\n## DESCRIPTION\n\ncpaneljsonxs converts between some input and output formats (one of them is JSON).\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OPTIONS**\n- **EXAMPLES**\n- **AUTHOR**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "cpanel_json_xs",
        "section": "",
        "mode": "man",
        "summary": "cpaneljsonxs - Cpanel::JSON::XS commandline utility",
        "synopsis": "cpaneljsonxs [-v] [-f inputformat] [-t outputformat]",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [
            "cpaneljsonxs -t none <isitreally.json",
            "\"JSON Lint\" - tries to parse the file isitreally.json as JSON - if  it  is  valid  JSON,  the",
            "command outputs nothing, otherwise it will print an error message and exit with non-zero exit",
            "status.",
            "<src.json cpaneljsonxs >pretty.json",
            "Prettify the JSON file src.json to dst.json.",
            "cpaneljsonxs -f storable-file <file",
            "Read  the  serialized  Storable  file  file  and print a human-readable JSON version of it to",
            "STDOUT.",
            "cpaneljsonxs -f storable-file -t yaml <file",
            "Same as above, but write YAML instead (not using JSON at all :)",
            "cpaneljsonxs -f none -e '$ = [1, 2, 3]'",
            "Dump the perl array as UTF-8 encoded JSON text.",
            "<torrentfile cpaneljsonxs -f bencode -e '$ = join \"\\n\", map @$, @{$->{\"announce-list\"}}' -t string",
            "Print the tracker list inside a torrent file.",
            "lwp-request http://cpantesters.perl.org/show/Cpanel-JSON-XS.json | cpaneljsonxs",
            "Fetch the cpan-testers result summary \"Cpanel::JSON::XS\" and pretty-print it.",
            "cpaneljsonxs -f yaml-xs -t yaml-tiny <META.yml   >MYMETA.yml",
            "cpaneljsonxs -f yaml-tiny -t yaml-xs <MYMETA.yml >XSMETA.yml",
            "cpaneljsonxs -f yaml -t yaml <XSMETA.yml #BOOM!",
            "Error: YAMLLOADERRBADMAPELEMENT",
            "Compare  YAML  en-  and  decoders,  and  see  that   YAML::XS   generates   unparsable   YAML",
            "<https://github.com/ingydotnet/yaml-libyaml-pm/issues/9>"
        ],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 61,
                "subsections": []
            },
            {
                "name": "EXAMPLES",
                "lines": 39,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 3,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "cpaneljsonxs - Cpanel::JSON::XS commandline utility\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "cpaneljsonxs [-v] [-f inputformat] [-t outputformat]\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "cpaneljsonxs converts between some input and output formats (one of them is JSON).\n\nThe default input format is \"json\" and the default output format is \"json-pretty\".\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "-v  Be slightly more verbose.\n\n-f fromformat\nRead a file in the given format from STDIN.\n\n\"fromformat\" can be one of:\n\njson - a json text encoded, either utf-8, utf16-be/le, utf32-be/le\njson-nonref - json according to RFC 7159\njson-relaxed - json with all relaxed options\njson-unknown - json with allowunknown\nstorable - a Storable frozen value\nstorable-file - a Storable file (Storable has two incompatible formats)\nbencode - uses one of Net::BitTorrent::Protocol::BEP03::Bencode, Bencode or the broken\nConvert::Bencode, if available (used by torrent files, among others)\nclzf - Compress::LZF format (requires that module to be installed)\neval - evaluate the given code as (non-utf-8) Perl, basically the reverse of \"-t dump\"\nyaml - loose YAML (requires YAML)\nyaml-tiny - loose YAML (requires YAML::Tiny or CPAN::Meta::YAML)\nyaml-xs - strict YAML 1.2 (requires YAML::XS)\nyaml-syck - YAML (requires YAML::Syck)\ncbor - CBOR (via CBOR::XS)\nstring - do not attempt to decode the file data\nsereal - Sereal (via Sereal::Decoder)\nnone - nothing is read, creates an \"undef\" scalar - mainly useful with \"-e\"\n-t toformat\nWrite the file in the given format to STDOUT.\n\n\"toformat\" can be one of:\n\njson, json-utf-8 - json, utf-8 encoded\njson-pretty - as above, but pretty-printed with sorted object keys\njson-stringify - as json-pretty with allowstringify\njson-relaxed  - as json-pretty, but with the additional options\n->allowstringify->allowblessed->convertblessed->allowunknown\n->allowtags->stringifyinfnan(1)\n\njson-utf-16le, json-utf-16be - little endian/big endian utf-16\njson-utf-32le, json-utf-32be - little endian/big endian utf-32\nstorable - a Storable frozen value in network format\nstorable-file - a Storable file in network format (Storable has two incompatible formats)\nbencode - uses one of Net::BitTorrent::Protocol::BEP03::Bencode, Bencode or the broken\nConvert::Bencode, if available (used by torrent files, among others)\nclzf - Compress::LZF format\nyaml - loose YAML (requires YAML)\nyaml-tiny - loose YAML (requires YAML::Tiny or CPAN::Meta::YAML)\nyaml-xs - strict YAML 1.2 (requires YAML::XS)\nyaml-syck - YAML (requires YAML::Syck)\ndump - Data::Dump\ndumper - Data::Dumper\nstring - writes the data out as if it were a string\nsereal - Sereal (via Sereal::Encoder)\nnone - nothing gets written, mainly useful together with \"-e\"\nNote  that  Data::Dumper  doesn't handle self-referential data structures correctly -\nuse \"dump\" instead.\n\n-e code\nEvaluate perl code after reading the data and before writing it out again - can  be  used\nto  filter, create or extract data. The data that has been written is in $, and whatever\nis in there is written out afterwards.\n",
                "subsections": []
            },
            "EXAMPLES": {
                "content": "cpaneljsonxs -t none <isitreally.json\n\n\"JSON Lint\" - tries to parse the file isitreally.json as JSON - if  it  is  valid  JSON,  the\ncommand outputs nothing, otherwise it will print an error message and exit with non-zero exit\nstatus.\n\n<src.json cpaneljsonxs >pretty.json\n\nPrettify the JSON file src.json to dst.json.\n\ncpaneljsonxs -f storable-file <file\n\nRead  the  serialized  Storable  file  file  and print a human-readable JSON version of it to\nSTDOUT.\n\ncpaneljsonxs -f storable-file -t yaml <file\n\nSame as above, but write YAML instead (not using JSON at all :)\n\ncpaneljsonxs -f none -e '$ = [1, 2, 3]'\n\nDump the perl array as UTF-8 encoded JSON text.\n\n<torrentfile cpaneljsonxs -f bencode -e '$ = join \"\\n\", map @$, @{$->{\"announce-list\"}}' -t string\n\nPrint the tracker list inside a torrent file.\n\nlwp-request http://cpantesters.perl.org/show/Cpanel-JSON-XS.json | cpaneljsonxs\n\nFetch the cpan-testers result summary \"Cpanel::JSON::XS\" and pretty-print it.\n\ncpaneljsonxs -f yaml-xs -t yaml-tiny <META.yml   >MYMETA.yml\ncpaneljsonxs -f yaml-tiny -t yaml-xs <MYMETA.yml >XSMETA.yml\ncpaneljsonxs -f yaml -t yaml <XSMETA.yml #BOOM!\nError: YAMLLOADERRBADMAPELEMENT\n\nCompare  YAML  en-  and  decoders,  and  see  that   YAML::XS   generates   unparsable   YAML\n<https://github.com/ingydotnet/yaml-libyaml-pm/issues/9>\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Copyright (C) 2008 Marc Lehmann <json@schmorp.de> Copyright (C) 2016 Cpanel Inc\n\nperl v5.38.2                                 2025-09-12                           CPANELJSONXS(1p)",
                "subsections": []
            }
        }
    }
}