Group
Extension

Matches 35358

TableDataRoles-Standard ( P/PE/PERLANCAR/TableDataRoles-Standard-0.025.tar.gz, PERLANCAR, 2024; MetaCPAN )
TableDataRoles-Standard/lib/TableDataRole/Munge/SerializeRef.pm ( view source; MetaCPAN )
ent";
    my $load = delete($args{load}) // 1;
    my $serializer = delete($args{serializer}) // 'json';
    die "Unknown argument(s): ". join(", ", sort keys %args)
        if keys %args;

    my $td
eData"}, $tabledata);

    if ($serializer eq 'json') {
        require JSON::MaybeXS;
        $serializer = sub {
            JSON::MaybeXS::encode_json($_[0]);
        };
    } elsif (ref($serialize
ne 'CODE') {
        die "Invalid value for serializer '$serializer': please supply a coderef or 'json'";
    }

    bless {
        tabledata => $tabledata,
        td => $td,
        pos => 0,
     
Mojolicious-Plugin-Data-Transfigure ( T/TY/TYRRMINAL/Mojolicious-Plugin-Data-Transfigure-0.01.tar.gz, TYRRMINAL, 2024; MetaCPAN )
Mojolicious-Plugin-Data-Transfigure/lib/Mojolicious/Plugin/Data/Transfigure.pm ( view source; MetaCPAN )
 qw(signatures);

sub register($self, $app, $conf) {
  my @renderers = ($conf->{renderers} // [qw(json)])->@*;
  my $prefix    = $conf->{prefix} // $DEFAULT_PREFIX;
  my $bare      = $conf->{bare};

 
quest body JSON
  $app->helper(
    "$prefix.json" => sub($c, %args) {
      my $lt   = exists($args{transfigurator}) ? delete($args{transfigurator}) : $t_in;
      my $data = $c->req->json;
      ret
ure

=head1 SYNOPSIS

  # in startup
  $app->plugin('Data::Transfigure' => {
    renderers => [qw(json openapi)]
  });

  $app->transfig->output->add_transfigurators(
    Data::Transfigure::Type->new(
SVG-Estimate ( C/CO/COLINK/SVG-Estimate-1.02.tar.gz, COLINK, 2024; MetaCPAN )
SVG-Estimate/56_subpaths.t ( view source; MetaCPAN )
:Estimate::Path';
use Image::SVG::Transform;
use Image::SVG::Path qw/extract_path_info/;
use JSON qw/to_json/;

my $suspect_path =<<EOSVG;
M 0,5 L 0,6 m 1,0 1,0 0,1 -1,0 z m 2,0 1,0 0,1 -1,0 z
EOSVG

-3 z
#m 31,-31 3,3 7,-7 -3,-3 z
#EOSVG

{
    my @path_info = extract_path_info($suspect_path, {absolute => 1, no_shortcuts => 1});
    diag to_json(\@path_info, { pretty => 1, });
}

done_testing();
Perinci-Sub-Gen-AccessTable ( P/PE/PERLANCAR/Perinci-Sub-Gen-AccessTable-0.594.tar.gz, PERLANCAR, 2024; MetaCPAN )
Perinci-Sub-Gen-AccessTable/lib/Perinci/Sub/Gen/AccessTable.pm ( view source; MetaCPAN )
n
 $ list_countries.pl --format=text-simple
 cn
 id
 sg
 us

 # show as json, randomize order
 $ list_countries.pl --format=json --random
 ["id","us","sg","cn"]

 # only list countries which are tagge
Acme-CPANModules-JSONVariants ( P/PE/PERLANCAR/Acme-CPANModules-JSONVariants-0.002.tar.gz, PERLANCAR, 2024; MetaCPAN )
Acme-CPANModules-JSONVariants/lib/Acme/CPANModules/JSONVariants.pm ( view source; MetaCPAN )
les::JSONVariants;

use strict;
use warnings;

use Acme::CPANModulesUtil::Misc;

our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
our $DATE = '2024-05-10'; # DATE
our $DIST = 'Acme-CPANModules-JSONVaria
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
co
 (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-li
CPAN-Static ( L/LE/LEONT/CPAN-Static-0.006.tar.gz, LEONT, 2024; MetaCPAN )
CPAN-Static/lib/CPAN/Static/Spec.pm ( view source; MetaCPAN )
figure a distribution. A valid
F<MYMETA.json> (with the C<dynamic_config> key set to C<0>) B<must> be
generated, it B<may> be copied verbatim to from F<META.json>. The same
may be done for F<MYMETA.ym
Data-TableReader ( N/NE/NERDVANA/Data-TableReader-0.021.tar.gz, NERDVANA, 2024; MetaCPAN )
Data-TableReader/lib/Data/TableReader.pm ( view source; MetaCPAN )
> \(my @messages)
  );
  
  my $records= $tr->iterator->all;
  ...
  $http_response->body( encode_json({ messages => \@messages }) );

=head1 DESCRIPTION

This module is designed to take "loose" or "d
Data-Dumper-UnDumper ( B/BI/BIGPRESH/Data-Dumper-UnDumper-0.02.tar.gz, BIGPRESH, 2024; MetaCPAN )
Data-Dumper-UnDumper/lib/Data/Dumper/UnDumper.pm ( view source; MetaCPAN )
d you use instead?  Any of the many serialisation
options that don't serialise as code - for e.g. JSON, YAML, etc.

I wrote this module, though, because I didn't have a choice - I was receiving
L<Data
g the C<<$Data::Dumper::PURITY>> setting, so it included C<$VAR1>
references, including re-used L<JSON::PP> objects.

This has been lightly tested with the default output from C<Data::Dumper::Dump()>.
Dist-Zilla-Plugin-Sorter ( P/PE/PERLANCAR/Dist-Zilla-Plugin-Sorter-0.001.tar.gz, PERLANCAR, 2024; MetaCPAN )
Dist-Zilla-Plugin-Sorter/lib/Dist/Zilla/Plugin/Sorter.pm ( view source; MetaCPAN )
    $pkg->meta;
}

# dzil also wants to get abstract for main module to put in dist's
# META.{yml,json}
sub before_build {
    my $self  = shift;
    my $name  = $self->zilla->name;
    my $class = $n
Pandoc ( V/VO/VOJ/Pandoc-0.9.2.tar.gz, VOJ, 2024; MetaCPAN )
Pandoc/lib/Pandoc/Version.pm ( view source; MetaCPAN )
=, 2 for >
        return unless $cmp_truth_table{ $op || '>=' }->[$cmp];
    }

    1;
}

sub TO_JSON {
    my ($self) = @_;
    return [ map { 0 + $_ } @$self ];
}

1;

__END__

=head1 NAME

Pandoc:
AN::Meta::Spec/Version Ranges> for possible values.

=head2 TO_JSON

Return an array reference of the version number to serialize in JSON format.

=head1 SEE ALSO

L<version> is a similar module for P
Pandoc ( V/VO/VOJ/Pandoc-0.9.2.tar.gz, VOJ, 2024; MetaCPAN )
Pandoc/lib/Pandoc/Release.pm ( view source; MetaCPAN )
package Pandoc::Release;
use 5.014;
use warnings;

our $VERSION = '0.9.2';

use HTTP::Tiny;
use JSON::PP;

use Cwd;
use File::Path qw(make_path remove_tree);
use File::Copy 'move';
use File::Temp 'tem
 \%headers } );

    $res->{success} or die "failed to fetch $url";
    $res->{content} = JSON::PP::decode_json( $res->{content} );

    $res;
}

sub get {
    shift if __PACKAGE__ eq ( $_[0] // '' );
Pandoc ( V/VO/VOJ/Pandoc-0.9.2.tar.gz, VOJ, 2024; MetaCPAN )
Pandoc/lib/Pandoc.pm ( view source; MetaCPAN )
shift;
    my $json   = "";

    if ( $format eq 'json' ) {
        $json = shift;
    }
    else {
        $pandoc->require('1.12.1');
        $json = $pandoc->convert( $format => 'json', @_ );
    }
s::pandoc_json($json);
}

sub file {
    my $pandoc = shift;
    $pandoc->require('1.12.1');

    my @args = ( @_, '-t' => 'json', '-o' => '-' );
    $pandoc->run( \@args, out => \( my $json ), throw 
=> 1 );

    require Pandoc::Elements;
    Pandoc::Elements::pandoc_json($json);
}

sub require {
    my $pandoc = shift;
    $pandoc = do { $PANDOC //= Pandoc->new } if $pandoc eq 'Pandoc';
    unles
Business-Monzo ( L/LE/LEEJO/Business-Monzo-0.13.tar.gz, LEEJO, 2024; MetaCPAN )
Business-Monzo/monzo_emulator.pl ( view source; MetaCPAN )
#!perl

use strict;
use warnings;

use Mojolicious::Lite;
use Mojo::JSON;

$ENV{MOJO_LOG_LEVEL} = 'debug';

plugin 'OAuth2::Server' => {
    access_token_ttl   => 21600,
    authorize_route    => '/',
  post '/ping/whoami' => sub {
        my ( $c ) = @_;

        $c->render( json => {
            authenticated => Mojo::JSON::true,
            client_id     => $c->oauth->{client},
            user_
,
        } );

    };

    get '/accounts' => sub {
        my ( $c ) = @_;

        $c->render( json => {
            accounts => [
                {
                    id          => "acc_00009237
Data-Transfigure ( T/TY/TYRRMINAL/Data-Transfigure-1.03.tar.gz, TYRRMINAL, 2024; MetaCPAN )
Data-Transfigure/lib/Data/Transfigure/Type/DBIx/Recursive.pm ( view source; MetaCPAN )
PTION

C<Data::Transfigure::Type::DBIx> is used to transfigure L<DBIx::Class::Row>
instances into JSON-able structures, using C<get_inflated_columns> to get make
a hashref from the object's keys (colu
CPAN-Static ( L/LE/LEONT/CPAN-Static-0.006.tar.gz, LEONT, 2024; MetaCPAN )
CPAN-Static/lib/CPAN/Static/Install.pm ( view source; MetaCPAN )
2abs abs2rel splitdir curdir/;
use Getopt::Long 2.36 qw/GetOptionsFromArray/;
use JSON::PP 2 qw/encode_json decode_json/;
use Scalar::Util 'blessed';

sub write_file {
	my ($filename, $content) = @_;
_install {
	my $meta = shift;
	if (!$meta) {
		return undef unless -f 'META.json';
		$meta = CPAN::Meta->load_file('META.json');
	}
	my $static_version = $meta->custom('x_static_install') || 0;
	retur
ETA.json');
	my %env = opts_from_args_string($ENV{PERL_MB_OPT});
	printf "Saving configuration for '%s' version '%s'\n", $meta->name, $meta->version;
	write_file('_static_build_params', encode_json([ 
Data-Transfigure ( T/TY/TYRRMINAL/Data-Transfigure-1.03.tar.gz, TYRRMINAL, 2024; MetaCPAN )
Data-Transfigure/lib/Data/Transfigure/Type/DBIx.pm ( view source; MetaCPAN )
PTION

C<Data::Transfigure::Type::DBIx> is used to transfigure L<DBIx::Class::Row>
instances into JSON-able structures, using C<get_inflated_columns> to get make
a hashref from the object's keys (colu
Business-Monzo ( L/LE/LEEJO/Business-Monzo-0.13.tar.gz, LEEJO, 2024; MetaCPAN )
Business-Monzo/lib/Business/Monzo/Exception.pm ( view source; MetaCPAN )
ta to a file as it may contain
sensitive information such as API key(s).

=cut

# plain string or JSON
has message => (
    is       => 'ro',
    required => 1,
    coerce   => sub {
        my ( $mes
Data-Transfigure ( T/TY/TYRRMINAL/Data-Transfigure-1.03.tar.gz, TYRRMINAL, 2024; MetaCPAN )
Data-Transfigure/lib/Data/Transfigure.pm ( view source; MetaCPAN )
ten to handle converting object graphs of ORM objects
into a structure that could be converted to JSON and delivered as an API endpoint
response. One of the challenges of such a system is being able t
Data-Transfigure ( T/TY/TYRRMINAL/Data-Transfigure-1.03.tar.gz, TYRRMINAL, 2024; MetaCPAN )
Data-Transfigure/lib/Data/Transfigure/Schema.pm ( view source; MetaCPAN )
y blessed($schema);
    say ref($schema);
    die("schema must be a JSON::Validator") unless (blessed($schema) && $schema->isa('JSON::Validator'));
  }

  method applies_to (%params) {
    my $node   
Business-Monzo ( L/LE/LEEJO/Business-Monzo-0.13.tar.gz, LEEJO, 2024; MetaCPAN )
Business-Monzo/lib/Business/Monzo/Resource.pm ( view source; MetaCPAN )
nstead.

=cut

use strict;
use warnings;

use Moo;
use Carp qw/ confess carp /;
use Mojo::JSON qw/ encode_json /;
use Scalar::Util qw/ blessed /;
use Try::Tiny;

=head1 ATTRIBUTES

The Resource class 
ash;
}

=head2 as_json

Returns a json string representation of the object.

    my $json = $transaction->as_json;

=cut

sub as_json {
    my ( $self ) = @_;

    return encode_json( { $self->to_hash
 } );
}

# for JSON encoding modules (convert_blessed)
sub TO_JSON { shift->to_hash; }

=head2 get

Returns a new instance of the object populated with the attributes having called
the API

    my $po

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