JSON::Whitespace - Remove whitespace from JSON
use JSON::Whitespace ':all'; my $in = <<EOF; { "animals":{ "kingkong":"🦍" }, "baka":[ "ドジ" ], "fruit":{ "grape":"🍇" }, "moons":{ "🌑":0 } } EOF my $minify = json_no_space ($in); print $minify;
This outputs
{"animals":{"kingkong":"🦍"},"baka":["ドジ"],"fruit":{"grape":"🍇"},"moons":{"🌑":0}}
This documents version 0.59_01 of JSON::Whitespace corresponding to git commit f945a07196d70245e08f8ce9e45b279c7c15f9d3 released on Mon Jan 25 12:26:47 2021 +0900.
Ben Bullock, <bkb@cpan.org>
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.
To install JSON::Parse, copy and paste the appropriate command in to your terminal.
cpanm
cpanm JSON::Parse
CPAN shell
perl -MCPAN -e shell install JSON::Parse
For more information on module installation, please visit the detailed CPAN module installation guide.