JSON::Whitespace(3pm) User Contributed Perl Documentation JSON::Whitespace(3pm)
NAME
JSON::Whitespace - Alter the insignificant whitespace of JSON
SYNOPSIS
use JSON::Whitespace ':all';
my $in = <<EOF;
{
"animals":{
"kingkong":""
},
"baka":[
""
],
"fruit":{
"grape":""
},
"moons":{
"":0
}
}
EOF
my $minify = json_minify ($in);
print $minify;
This outputs
{"animals":{"kingkong":""},"baka":[""],"fruit":{"grape":""},"moons":{"":0}}
VERSION
This documents version 0.61 of JSON::Whitespace corresponding to git commit
033269fa8972fdce8626aa65cd11a5394ab50492 <https://github.com/benkasminbullock/JSON-
Parse/commit/033269fa8972fdce8626aa65cd11a5394ab50492> released on Thu Feb 11 09:14:04
2021 +0900.
DESCRIPTION
This module offers functions to manipulate the "insignificant whitespace" part of a JSON
string (the whitespace which is not inside strings). According to the JSON specification
"insignificant whitespace" consists of space (%x20), horizontal tab (%x09), line feed or
new line (%x0A) and carriage return (%x0D).
FUNCTIONS
json_indent
my $indented = json_indent ($json);
Add indentation to $json.
json_minify
my $minified = json_minify ($json);
Remove all whitespace, including trailing newlines, from $json.
SEE ALSO
Documentation about JSON is in JSON::Parse. JSON::Whitespace is based on JSON::Tokenize,
which breaks JSON into tokens without putting it into Perl structures.
AUTHOR
Ben Bullock, <bkb AT cpan.org>
COPYRIGHT & LICENCE
This package and associated files are copyright (C) 2016-2021 Ben Bullock.
You can use, copy, modify and redistribute this package and associated files under the
Perl Artistic Licence or the GNU General Public Licence.
perl v5.34.0 2022-02-06 JSON::Whitespace(3pm)
Generated by $Id: phpMan.php,v 4.55 2007/09/05 04:42:51 chedong Exp $ Author: Che Dong
On Apache
Under GNU General Public License
2025-11-21 17:16 @216.73.216.164 CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)