Group
Extension

Matches 5

Perinci-Examples ( P/PE/PERLANCAR/Perinci-Examples-0.825.tar.gz, PERLANCAR, 2024; MetaCPAN )
Perinci-Examples/lib/Perinci/Examples.pm ( view source; MetaCPAN )
tr'  },
        action  => { schema => 'str'  },
        version => { schema => 'str'  },
        json    => { schema => 'bool' },
        yaml    => { schema => 'bool' },
        perl    => { schema 
 the `default` property
of the argument specification, the metadata is also not JSON-safe.

To pass binary data over JSON/Riap, you can use Riap version 1.2 and encode the
argument with ":base64" suff
.

To receive binary result over JSON/Riap, you can use Riap version 1.2 which will
automatically encode binary data with base64 so it is safe when transformed as
JSON. The client library will also de
Perinci-Examples ( P/PE/PERLANCAR/Perinci-Examples-0.825.tar.gz, PERLANCAR, 2024; MetaCPAN )
Perinci-Examples/lib/Perinci/Examples/Tiny/Result.pm ( view source; MetaCPAN )
    description => <<'_',

This is an example of result that needs cleaning if to be displayed as JSON.

_
    args => {
    },
};
sub returns_circular {
    my $circ = [1, 2, 3];
    push @$circ, $ci
    description => <<'_',

This is an example of result that needs cleaning if to be displayed as JSON.

_
    args => {
    },
};
sub returns_scalar_ref {
    [200, "OK", \10];
}

1;
# ABSTRACT: Test
turns circular structure.

This is an example of result that needs cleaning if to be displayed as JSON.

This function is not exported.

No arguments.

Returns an enveloped result (an array).

First e
Perinci-Examples ( P/PE/PERLANCAR/Perinci-Examples-0.825.tar.gz, PERLANCAR, 2024; MetaCPAN )
Perinci-Examples/lib/Perinci/Examples/Stream.pm ( view source; MetaCPAN )
demonstration of accepting a stream of hashes. In command-line
application this will translate to JSON stream.

_
    args => {
        input => {
            req => 1,
            stream => 1,
      
demonstration of accepting a stream of hashes. In command-line
application this will translate to JSON stream.

This function is not exported.

Arguments ('*' denotes required arguments):

=over 4

=i
Perinci-Examples ( P/PE/PERLANCAR/Perinci-Examples-0.825.tar.gz, PERLANCAR, 2024; MetaCPAN )
Perinci-Examples/lib/Perinci/Examples/CLI.pm ( view source; MetaCPAN )
_',

Argument with non-scalar types (like array or hash) can be specified in the CLI
using `--ARG-json` or `--ARG-yaml`. Arguments with type of array of string can
also be specified using multiple `--
    test => 0,
        },
        {
            argv => ['--int1', '20', '--str1', 'x', '--array1-json', '[1,2]'],
            summary => 'A second example',
            test => 0,
        },
    ],
}
l.

Argument with non-scalar types (like array or hash) can be specified in the CLI
using C<--ARG-json> or C<--ARG-yaml>. Arguments with type of array of string can
also be specified using multiple C<
Perinci-Examples ( P/PE/PERLANCAR/Perinci-Examples-0.825.tar.gz, PERLANCAR, 2024; MetaCPAN )
Perinci-Examples/lib/Perinci/Examples/CmdLineResMeta.pm ( view source; MetaCPAN )
mmary => 'Set cmdline.default_format json',
    args => {
    },
};
sub default_format {
    my %args = @_;
    [200, "OK", undef, {'cmdline.default_format'=>'json'}];
}

$SPEC{skip_format} = {
    v 
 default_format() -> [$status_code, $reason, $payload, \%result_meta]

Set cmdline.default_format json.

This function is not exported.

No arguments.

Returns an enveloped result (an array).

First e

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.