Data::Format::Pretty::JSON - Pretty-print data structure as JSON
This document describes version 0.12 of Data::Format::Pretty::JSON (from Perl distribution Data-Format-Pretty-JSON), released on 2016-03-11.
use Data::Format::Pretty::JSON qw(format_pretty); print format_pretty($data);
This module uses JSON::MaybeXS or JSON::Color to encode data as JSON.
Return formatted data structure as JSON. Options:
color => BOOL (default: from env or 1 on interactive)
Whether to enable coloring. The default is the enable only when running interactively.
pretty => BOOL (default: 1)
Whether to pretty-print JSON.
linum => BOOL (default: from env or 0)
Whether to add line numbers.
Return application/json.
application/json
Set color option (if unset).
color
Set linum option (if unset).
linum
Please visit the project's homepage at https://metacpan.org/release/Data-Format-Pretty-JSON.
Source repository is at https://github.com/perlancar/perl-Data-Format-Pretty-JSON.
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.
Data::Format::Pretty
perlancar <perlancar@cpan.org>
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.
To install Data::Format::Pretty::JSON, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::Format::Pretty::JSON
CPAN shell
perl -MCPAN -e shell install Data::Format::Pretty::JSON
For more information on module installation, please visit the detailed CPAN module installation guide.