NAME

Data::Format::Pretty::CompactJSON - Pretty-print data structure as compact JSON

VERSION

This document describes version 0.12 of Data::Format::Pretty::CompactJSON (from Perl distribution Data-Format-Pretty-JSON), released on 2016-03-11.

SYNOPSIS

 use Data::Format::Pretty::CompactJSON qw(format_pretty);
 print format_pretty($data);

Some example output:

  • format_pretty({a=>1, b=>2});

     {"a":1,"b":2}

DESCRIPTION

Like Data::Format::Pretty::JSON, but will always print with JSON option pretty => 0 (minimal indentation).

FUNCTIONS

format_pretty($data, \%opts)

Return formatted data structure as JSON. Options:

  • color => BOOL

    Whether to enable coloring. The default is the enable only when running interactively.

content_type() => STR

Return application/json.

ENVIRONMENT

COLOR => BOOL

Set color option (if unset).

HOMEPAGE

Please visit the project's homepage at https://metacpan.org/release/Data-Format-Pretty-JSON.

SOURCE

Source repository is at https://github.com/perlancar/perl-Data-Format-Pretty-JSON.

BUGS

Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Data-Format-Pretty-JSON

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

SEE ALSO

Data::Format::Pretty::JSON

AUTHOR

perlancar <perlancar@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2016 by perlancar@cpan.org.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.