Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

jsonlint(1) [debian man page]

JSONLINT(1)						      General Commands Manual						       JSONLINT(1)

NAME
jsonlint - A JSON syntax validator and formatter tool SYNOPSIS
jsonlint [-v][-s|-S][-f|-F][-ecodec]inputfile.json... DESCRIPTION
This manual page documents briefly the jsonlint commands. OPTIONS
The return status will be 0 if the file is legal JSON, or non-zero otherwise. Use -v to see the warning details. Options are: -v, -s, -S, -f, -F, -e -v, --verbose Show details of lint checking -s, --strict Be strict in what is considered legal JSON (the default) -S, --nonstrict Be loose in what is considered legal JSON -f, --format Reformat the JSON (if legal) to stdout -F, --format-compactly Reformat the JSON simlar to -f, but do so compactly by removing all unnecessary whitespace -e codec, --encoding=codec --input-encoding=codec --output-encoding=codec Set the input and output character encoding codec (e.g., ascii, utf8, utf-16). The -e will set both the input and output encodings to the same thing. If not supplied, the input encoding is guessed according to the JSON specification. The output encoding defaults to UTF-8, and is used when reformatting (via the -f or -F options). When reformatting, all members of objects (associative arrays) are always output in lexigraphical sort order. The default output codec is UTF-8, unless the -e option is provided. Any Unicode characters will be output as literal characters if the encoding per- mits, otherwise they will be -escaped. You can use "-e ascii" to force all Unicode characters to be escaped. AUTHOR
jsonlint was written by Deron Meranda <deron.meranda@gmail.com>. This manual page was written by TANIGUCHI Takaki <takaki@debian.org>, for the Debian project (and may be used by others). 2009-12-01 JSONLINT(1)

Check Out this Related Man Page

Jifty::JSON(3pm)					User Contributed Perl Documentation					  Jifty::JSON(3pm)

NAME
Jifty::JSON -- Wrapper around JSON SYNOPSIS
use Jifty::JSON qw/decode_json encode_json/; my $obj = decode_json(q! { "x": "1", "y": "2", "z": "3" } !); my $json = encode_json($obj); DESCRIPTION
Provides a thin wrapper around the JSON 2.xx library, which provides a frontend for JSON::XS and JSON::PP. This module used to wrap JSON::Syck and JSON 1.xx with special-casing for outputting JSON with single quoted values. Single quotes make it easy to simply plop JSON into HTML attributes but are in violation of the JSON spec which mandates only double quoted strings. The old behavior is now unsupported and it is recommended that you simply HTML escape your entire blob of JSON if you are sticking it in an HTML attribute. You can use Jifty->web->escape() to properly escape problematic characters for HTML. FUNCTIONS
decode_json JSON, [ARGUMENT HASHREF] encode_json JSON, [ARGUMENT HASHREF] These functions are just like JSON's, except that you can pass options to them like you can with JSON's "from_json" and "to_json" functions. By default they encode/decode using UTF8 (like JSON's functions of the same name), but you can turn that off by passing "utf8 => 0" in the options. The allow_nonref flag is also enabled for backwards compatibility with earlier versions of this module. It allows encoding/decoding of values that are not references. JSON is imported with the "-support_by_pp" flag in order to support all options that JSON::PP provides when using JSON::XS as the backend. If you are concerned with speed, be careful what options you specify as it may cause the pure Perl backend to be used. Read "JSON::PP SUPPORT METHODS" in JSON for more information. DEPRECATED FUNCTIONS
jsonToObj JSON, [ARGUMENTS] objToJson JSON, [ARGUMENTS] These functions are deprecated and provided for backwards compatibility. They wrap the appropriate function above, but "croak" in Carp if you try to set the "singlequote" option. LICENSE
Jifty is Copyright 2005-2010 Best Practical Solutions, LLC. Jifty is distributed under the same terms as Perl itself. perl v5.14.2 2010-12-08 Jifty::JSON(3pm)
Man Page