=encoding UTF-8 =head1 NAME JSON::Whitespace - Alter the insignificant whitespace of JSON =head1 SYNOPSIS use JSON::Whitespace ':all'; my $in = < released on Thu Feb 11 09:14:04 2021 +0900. =head1 DESCRIPTION This module offers functions to manipulate the "insignificant whitespace" part of a JSON string (the whitespace which is not inside strings). According to L "insignificant whitespace" consists of space (C<%x20>), horizontal tab (C<%x09>), line feed or new line (C<%x0A>) and carriage return (C<%x0D>). =head1 FUNCTIONS =head2 json_indent my $indented = json_indent ($json); Add indentation to C<$json>. =head2 json_minify my $minified = json_minify ($json); Remove all whitespace, including trailing newlines, from C<$json>. =head1 SEE ALSO Documentation about JSON is in L. JSON::Whitespace is based on L, which breaks JSON into tokens without putting it into Perl structures. =head1 AUTHOR Ben Bullock, =head1 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.