JSON::Whitespace(3)
β¨ JSON::Whitespace β¨
okay so bestie, this module is literally here to alter the insignificant whitespace of JSON π. Like it's giving very "I know what you are" energy, but for prettying up or stripping down your JSON's spacing situation. No cap π .
π SYNOPSIS π
fr fr, here's the vibe check:
use JSON::Whitespace ':all';
my $in = <<EOF;
{
"animals":{
"kingkong":"π¦"
},
"baka":[
"γγΈ"
],
"fruit":{
"grape":"π"
},
"moons":{
"π":0
}
}
EOF
my $minify = json_minify ($in);
print $minify;
This outputs β and the way it just ate that whitespace π¦:
{"animals":{"kingkong":"π¦"},"baka":["γγΈ"],"fruit":{"grape":"π"},"moons":{"π":0}}
πΈ VERSION πΈ
This documents version 0.62 of JSON::Whitespace corresponding to git commit d04630086f6c92fea720cba4568faa0cbbdde5a6 <https://github.com/benkasminbullock/JSON-Parse/commit/d04630086f6c92fea720cba4568faa0cbbdde5a6> released on Sat Jul 16 08:23:13 2022 +0900. iconic, honestly β.
π DESCRIPTION π
This module offers functions to manipulate the "insignificant whitespace" part of a JSON string (the whitespace which is not inside strings). Lowkey important to know: according to the JSON specification, "insignificant whitespace" consists of space (%x20), horizontal tab (%x09), line feed or new line (%x0A) and carriage return (%x0D). that's the whole squad of lil space gremlins π.
β¨ FUNCTIONS β¨
π¦ json_indent
my $indented = json_indent ($json);
Add indentation to $json. she's giving "make it fancy" energy π
.
π json_minify
my $minified = json_minify ($json);
Remove all whitespace, including trailing newlines, from $json. literally zero crumbs left, periodt π.
π«Ά 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. iykyk π§.
π AUTHOR π
Ben Bullock, <bkb@cpan.org> β respectfully, a real one π.
π COPYRIGHT & LICENCE π
This package and associated files are copyright (C) 2016-2022 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. get you a license that can do both π.
okay so that's the whole page bestie β JSON::Whitespace version 0.62, git commit d04630086f6c92fea720cba4568faa0cbbdde5a6, it dropped on Sat Jul 16 08:23:13 2022 +0900, and it's forever serving perl v5.42.0 realness from 2022-07-16 π₯π
β¨.
π¦ where this page comes from
- opensuse-leap 16.0: perl-JSON-Parse 0.62-bp160.1.12 Β· Artistic-1.0 OR GPL-1.0-or-later
- opensuse-leap 16.0: perl-JSON-Parse 0.62-bp160.1.12 Β· Artistic-1.0 OR GPL-1.0-or-later
- opensuse-leap 16.0: perl-JSON-Parse 0.62-bp160.1.12 Β· Artistic-1.0 OR GPL-1.0-or-later
- opensuse-leap 16.0: perl-JSON-Parse 0.62-bp160.1.12 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms