Acme-CPANModules-JSONVariants

 view release on metacpan or  search on metacpan

LICENSE  view on Meta::CPAN

    a) cause the modified files to carry prominent notices stating that
    you changed the files and the date of any change; and

    b) cause the whole of any work that you distribute or publish, that
    in whole or in part contains the Program or any part thereof, either
    with or without modifications, to be licensed at no charge to all
    third parties under the terms of this General Public License (except
    that you may choose to grant warranty protection to some or all
    third parties, at your option).

    c) If the modified program normally reads commands interactively when
    run, you must cause it, when started running for such interactive use
    in the simplest and most usual way, to print or display an
    announcement including an appropriate copyright notice and a notice
    that there is no warranty (or else, saying that you provide a
    warranty) and that users may redistribute the program under these
    conditions, and telling the user how to view a copy of this General
    Public License.

    d) You may charge a fee for the physical act of transferring a
    copy, and you may at your option offer warranty protection in

LICENSE  view on Meta::CPAN

Also add information on how to contact you by electronic and paper mail.

If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:

    Gnomovision version 69, Copyright (C) 19xx name of author
    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
    This is free software, and you are welcome to redistribute it
    under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the
appropriate parts of the General Public License.  Of course, the
commands you use may be called something other than `show w' and `show
c'; they could even be mouse-clicks or menu items--whatever suits your
program.

You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary.  Here a sample; alter the names:

  Yoyodyne, Inc., hereby disclaims all copyright interest in the
  program `Gnomovision' (a program to direct compilers to make passes
  at assemblers) written by James Hacker.

META.json  view on Meta::CPAN

                        "class" : "Pod::Weaver::Section::Region",
                        "name" : "@Author::PERLANCAR/postlude",
                        "version" : "4.019"
                     },
                     {
                        "class" : "Pod::Weaver::Section::Completion::GetoptLongComplete",
                        "name" : "@Author::PERLANCAR/Completion::GetoptLongComplete",
                        "version" : "0.08"
                     },
                     {
                        "class" : "Pod::Weaver::Section::Completion::GetoptLongSubcommand",
                        "name" : "@Author::PERLANCAR/Completion::GetoptLongSubcommand",
                        "version" : "0.04"
                     },
                     {
                        "class" : "Pod::Weaver::Section::Completion::GetoptLongMore",
                        "name" : "@Author::PERLANCAR/Completion::GetoptLongMore",
                        "version" : "0.001"
                     },
                     {
                        "class" : "Pod::Weaver::Section::Homepage::DefaultCPAN",
                        "name" : "@Author::PERLANCAR/Homepage::DefaultCPAN",

META.yml  view on Meta::CPAN

              version: '4.019'
            -
              class: Pod::Weaver::Section::Region
              name: '@Author::PERLANCAR/postlude'
              version: '4.019'
            -
              class: Pod::Weaver::Section::Completion::GetoptLongComplete
              name: '@Author::PERLANCAR/Completion::GetoptLongComplete'
              version: '0.08'
            -
              class: Pod::Weaver::Section::Completion::GetoptLongSubcommand
              name: '@Author::PERLANCAR/Completion::GetoptLongSubcommand'
              version: '0.04'
            -
              class: Pod::Weaver::Section::Completion::GetoptLongMore
              name: '@Author::PERLANCAR/Completion::GetoptLongMore'
              version: '0.001'
            -
              class: Pod::Weaver::Section::Homepage::DefaultCPAN
              name: '@Author::PERLANCAR/Homepage::DefaultCPAN'
              version: '0.05'
            -

README  view on Meta::CPAN

    This document describes version 0.002 of Acme::CPANModules::JSONVariants
    (from Perl distribution Acme-CPANModules-JSONVariants), released on
    2024-05-10.

DESCRIPTION
    JSON is hugely popular, yet very simple. This has led to various
    extensions or variants of JSON.

    An overwhelmingly popular extension is comments, because JSON is used a
    lot in configuration. Another popular extension is dangling (trailing)
    comma.

    This list catalogs the various JSON variants which have a Perl
    implementation on CPAN.

    1) JSON5. <https://json5.org/>, "JSON for Humans". Allowing more
    whitespaces, single-line comment (C++-style), multiline comment
    (C-style), single quote for strings, hexadecimal number literal (e.g.
    0x123abc), leading decimal point, trailing decimal point, positive sign
    in number, trailing commas.

    Perl modules: JSON5, File::Serialize::Serializer::JSON5.

    2) HJSON. <https://hjson.org>, Human JSON. A JSON variant that aims to
    be more user-friendly by allowing comments, unquoted keys, and optional
    commas. It's designed to be easier to read and write by humans.

    Perl modules: (none so far).

    3) JSONC. <https://github.com/komkom/jsonc>. JSON with Comments. Also
    allows unquoted string values with whitespace as delimiters.

    Perl modules: (none so far).

    4) jsonc.
    <https://code.visualstudio.com/docs/languages/json#_json-with-comments>.
    Another "JSON with Comments", supported by Microsoft Visual Code.

    Perl modules: (none so far).

    5) CSON. <https://github.com/bevry/cson>. CofeeScript Object Notation.
    JSON-like data serialization format inspired by CoffeeScript syntax. It
    allows for a more concise representation of data by leveraging
    CoffeeScript's features such as significant whitespace and optional
    commas.

    Perl modules: (none so far).

    6) RJSON. <https://relaxedjson.org/>. Relaxed JSON. Trailing commas,
    Optional commas, comments (C-style and C++-style), single-quoted &
    backtick-quoted strings as well as bare/unquoted, hash key without value
    (value will default to "undef"). It touts itself as "going beyond other
    JSON variants, including JSON5."

    Perl modules: JSON::Relaxed.

    7) JSON::Diffable. Basically just allowing for trailing commas.

    8) JSONLines. <https://jsonlines.org>. A more restrictive JSON format,
    all JSON records must fit in one line as newline is the record
    delimiter. Encoding must be UTF-8. Convention for line-oriented
    processing which support JSON. E.g. for CSV replacement.

    Perl moduless: JSON::Lines.

    9) YAML. <https://yaml.org/>. YAML is a superset of JSON. It allows for
    indentation-based syntax and various features like references, heredocs,

README  view on Meta::CPAN


    or Acme::CM::Get:

        % perl -MAcme::CM::Get=JSONVariants -E'say $_->{module} for @{ $LIST->{entries} }' | cpanm -n

    or directly:

        % perl -MAcme::CPANModules::JSONVariants -E'say $_->{module} for @{ $Acme::CPANModules::JSONVariants::LIST->{entries} }' | cpanm -n

    This Acme::CPANModules module also helps lcpan produce a more meaningful
    result for "lcpan related-mods" command when it comes to finding related
    modules for the modules listed in this Acme::CPANModules module. See
    App::lcpan::Cmd::related_mods for more details on how "related modules"
    are found.

HOMEPAGE
    Please visit the project's homepage at
    <https://metacpan.org/release/Acme-CPANModules-JSONVariants>.

SOURCE
    Source repository is at

lib/Acme/CPANModules/JSONVariants.pm  view on Meta::CPAN

our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
our $DATE = '2024-05-10'; # DATE
our $DIST = 'Acme-CPANModules-JSONVariants'; # DIST
our $VERSION = '0.002'; # VERSION

my $text = <<'MARKDOWN';
JSON is hugely popular, yet very simple. This has led to various extensions or
variants of JSON.

An overwhelmingly popular extension is comments, because JSON is used a lot in
configuration. Another popular extension is dangling (trailing) comma.

This list catalogs the various JSON variants which have a Perl implementation on
CPAN.


1) **JSON5**. <https://json5.org/>, "JSON for Humans". Allowing more
whitespaces, single-line comment (C++-style), multiline comment (C-style),
single quote for strings, hexadecimal number literal (e.g. 0x123abc), leading
decimal point, trailing decimal point, positive sign in number, trailing commas.

Perl modules: <pm:JSON5>, <pm:File::Serialize::Serializer::JSON5>.


2) **HJSON**. <https://hjson.org>, Human JSON. A JSON variant that aims to be
more user-friendly by allowing comments, unquoted keys, and optional commas.
It's designed to be easier to read and write by humans.

Perl modules: (none so far).


3) **JSONC**. <https://github.com/komkom/jsonc>. JSON with Comments. Also allows
unquoted string values with whitespace as delimiters.

Perl modules: (none so far).


4) **jsonc**. <https://code.visualstudio.com/docs/languages/json#_json-with-comments>.
Another "JSON with Comments", supported by Microsoft Visual Code.

Perl modules: (none so far).


5) **CSON**. <https://github.com/bevry/cson>. CofeeScript Object Notation.
JSON-like data serialization format inspired by CoffeeScript syntax. It allows
for a more concise representation of data by leveraging CoffeeScript's features
such as significant whitespace and optional commas.

Perl modules: (none so far).


6) **RJSON**. <https://relaxedjson.org/>. Relaxed JSON. Trailing commas,
Optional commas, comments (C-style and C++-style), single-quoted &
backtick-quoted strings as well as bare/unquoted, hash key without value (value
will default to `undef`). It touts itself as "going beyond other JSON variants,
including JSON5."

Perl modules: <pm:JSON::Relaxed>.


7) **<pm:JSON::Diffable>**. Basically just allowing for trailing commas.


8) **JSONLines**. <https://jsonlines.org>. A more restrictive JSON format, all
JSON records must fit in one line as newline is the record delimiter. Encoding
must be UTF-8. Convention for line-oriented processing which support JSON. E.g.
for CSV replacement.

Perl moduless: <pm:JSON::Lines>.


lib/Acme/CPANModules/JSONVariants.pm  view on Meta::CPAN

=head1 VERSION

This document describes version 0.002 of Acme::CPANModules::JSONVariants (from Perl distribution Acme-CPANModules-JSONVariants), released on 2024-05-10.

=head1 DESCRIPTION

JSON is hugely popular, yet very simple. This has led to various extensions or
variants of JSON.

An overwhelmingly popular extension is comments, because JSON is used a lot in
configuration. Another popular extension is dangling (trailing) comma.

This list catalogs the various JSON variants which have a Perl implementation on
CPAN.

1) B<JSON5>. L<https://json5.org/>, "JSON for Humans". Allowing more
whitespaces, single-line comment (C++-style), multiline comment (C-style),
single quote for strings, hexadecimal number literal (e.g. 0x123abc), leading
decimal point, trailing decimal point, positive sign in number, trailing commas.

Perl modules: L<JSON5>, L<File::Serialize::Serializer::JSON5>.

2) B<HJSON>. L<https://hjson.org>, Human JSON. A JSON variant that aims to be
more user-friendly by allowing comments, unquoted keys, and optional commas.
It's designed to be easier to read and write by humans.

Perl modules: (none so far).

3) B<JSONC>. L<https://github.com/komkom/jsonc>. JSON with Comments. Also allows
unquoted string values with whitespace as delimiters.

Perl modules: (none so far).

4) B<jsonc>. L<https://code.visualstudio.com/docs/languages/json#_json-with-comments>.
Another "JSON with Comments", supported by Microsoft Visual Code.

Perl modules: (none so far).

5) B<CSON>. L<https://github.com/bevry/cson>. CofeeScript Object Notation.
JSON-like data serialization format inspired by CoffeeScript syntax. It allows
for a more concise representation of data by leveraging CoffeeScript's features
such as significant whitespace and optional commas.

Perl modules: (none so far).

6) B<RJSON>. L<https://relaxedjson.org/>. Relaxed JSON. Trailing commas,
Optional commas, comments (C-style and C++-style), single-quoted &
backtick-quoted strings as well as bare/unquoted, hash key without value (value
will default to C<undef>). It touts itself as "going beyond other JSON variants,
including JSON5."

Perl modules: L<JSON::Relaxed>.

7) B<< L<JSON::Diffable> >>. Basically just allowing for trailing commas.

8) B<JSONLines>. L<https://jsonlines.org>. A more restrictive JSON format, all
JSON records must fit in one line as newline is the record delimiter. Encoding
must be UTF-8. Convention for line-oriented processing which support JSON. E.g.
for CSV replacement.

Perl moduless: L<JSON::Lines>.

9) B<YAML>. L<https://yaml.org/>. YAML is a superset of JSON. It allows for
indentation-based syntax and various features like references, heredocs, etc.

lib/Acme/CPANModules/JSONVariants.pm  view on Meta::CPAN


or L<Acme::CM::Get>:

    % perl -MAcme::CM::Get=JSONVariants -E'say $_->{module} for @{ $LIST->{entries} }' | cpanm -n

or directly:

    % perl -MAcme::CPANModules::JSONVariants -E'say $_->{module} for @{ $Acme::CPANModules::JSONVariants::LIST->{entries} }' | cpanm -n

This Acme::CPANModules module also helps L<lcpan> produce a more meaningful
result for C<lcpan related-mods> command when it comes to finding related
modules for the modules listed in this Acme::CPANModules module.
See L<App::lcpan::Cmd::related_mods> for more details on how "related modules"
are found.

=head1 HOMEPAGE

Please visit the project's homepage at L<https://metacpan.org/release/Acme-CPANModules-JSONVariants>.

=head1 SOURCE

t/00-compile.t  view on Meta::CPAN


use File::Spec;
use IPC::Open3;
use IO::Handle;

open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!";

my @warnings;
for my $lib (@module_files)
{
    # see L<perlfaq8/How can I capture STDERR from an external command?>
    my $stderr = IO::Handle->new;

    diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
            $^X, @switches, '-e', "require q[$lib]"))
        if $ENV{PERL_COMPILE_TEST_DEBUG};

    my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]");
    binmode $stderr, ':crlf' if $^O eq 'MSWin32';
    my @_warnings = <$stderr>;
    waitpid($pid, 0);



( run in 4.651 seconds using v1.01-cache-2.11-cpan-f56aa216473 )