JSON::Encode::TableData - Encode table data to JSON (put each row on its own line)
This document describes version 0.002 of JSON::Encode::TableData (from Perl distribution JSON-Encode-TableData), released on 2020-10-22.
use JSON::Encode::TableData qw(encode_json); # not exported automatically say encode_json([200, "OK", [{rownum=>1, a=>"one"}, {rownum=>2, a=>"two"}, {rownum=>3, a=>"three"}]]);
Sample output:
[200,"OK",[ {rownum=>1, a=>"one"}, {rownum=>2, a=>"two"}, {rownum=>3, a=>"three"}, ]
This is a JSON encoder specifically for table data (consult td from App::td to read more about table data). Its goal is to display each table row on a separate line for ease of grepping.
Please visit the project's homepage at https://metacpan.org/release/JSON-Encode-TableData.
Source repository is at https://github.com/perlancar/perl-JSON-Encode-TableData.
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=JSON-Encode-TableData
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.
JSON::MaybeXS and a plethora of other JSON encoders.
td from App::td to read more about table data.
perlancar <perlancar@cpan.org>
This software is copyright (c) 2020 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 JSON::Encode::TableData, copy and paste the appropriate command in to your terminal.
cpanm
cpanm JSON::Encode::TableData
CPAN shell
perl -MCPAN -e shell install JSON::Encode::TableData
For more information on module installation, please visit the detailed CPAN module installation guide.