Group
Extension

Matches 35358

MIME-DB ( T/TD/TDRUGEON/MIME-DB-v1.52.0.tar.gz, TDRUGEON, 2023; MetaCPAN )
MIME-DB/tools/generate.pl ( view source; MetaCPAN )
enerates lib/MIME/DB.pm for a given mime-db version
##
use strict;
use warnings;
use JSON::XS qw(decode_json);

# changelog: https://github.com/jshttp/mime-db/releases

my $cmd = join(" ", $0,
db.json', $tag;
my $url = sprintf 'https://cdn.jsdelivr.net/gh/jshttp/mime-db@%s/db.json', $tag;

print STDERR "getting $url\n";

my $json = `curl -k -f -s $url` || die;

my $db = decode_json($
MIME-DB ( T/TD/TDRUGEON/MIME-DB-v1.52.0.tar.gz, TDRUGEON, 2023; MetaCPAN )
MIME-DB/lib/MIME/DB.pm ( view source; MetaCPAN )
urce url: https://cdn.jsdelivr.net/gh/jshttp/mime-db@v1.52.0/db.json
use constant version => 'v1.52.0';
sub data { {'application/mud+json',{source=>'iana',compressible=>1},'application/vnd.commonspace
>['hpgl']},'application/vnd.motorola.flexsuite',{source=>'iana'},'application/vnd.coreos.ignition+json',{compressible=>1,source=>'iana'},'application/vnd.kodak-descriptor',{source=>'iana',extensions=>
,{source=>'iana'},'application/dssc+der',{extensions=>['dssc'],source=>'iana'},'application/dicom+json',{compressible=>1,source=>'iana'},'application/gxf',{source=>'apache',extensions=>['gxf']},'model
Alien-Plotly-Kaleido ( S/SL/SLOYD/Alien-Plotly-Kaleido-0.003.tar.gz, SLOYD, 2023; MetaCPAN )
Alien-Plotly-Kaleido/lib/Alien/Plotly/Kaleido.pm ( view source; MetaCPAN )
 = '0.003'; # VERSION

use parent 'Alien::Base';

use File::Which qw(which);
use IPC::Run ();
use JSON ();
use Path::Tiny ();

sub bin_dir {
    my ($class) = @_;
    if ( $class->install_type eq 'sys
o');
    if ($kaleido) {
        my $decode_json_safe = sub {
            my ($out) = @_;
            my $data;
            eval { $data = JSON::decode_json($out); };
            $@ = '' if ($@);
    
 ( not $data and not $t->is_expired ) {
                $h->pump;
                $data = $decode_json_safe->($out);
            }
            $h->finish;
        };
        if ($@) {
            warn
Dancer ( Y/YA/YANICK/Dancer-1.3521.tar.gz, YANICK, 2023; MetaCPAN )
Dancer/lib/Dancer.pm ( view source; MetaCPAN )
ancer::Hook;
use Dancer::Logger;
use Dancer::Renderer;
use Dancer::Route;
use Dancer::Serializer::JSON;
use Dancer::Serializer::YAML;
use Dancer::Serializer::XML;
use Dancer::Serializer::Dumper;
use D
er_version
  debug
  del
  dirname
  info
  error
  engine
  false
  forward
  from_dumper
  from_json
  from_yaml
  from_xml
  get
  halt
  header
  headers
  hook
  layout
  load
  load_app
  logger
error
  set
  setting
  set_cookie
  session
  splat
  status
  start
  template
  to_dumper
  to_json
  to_yaml
  to_xml
  true
  upload
  captures
  uri_for
  var
  vars
  warning
);

# Dancer's syn
Chart-GGPlot ( S/SL/SLOYD/Chart-GGPlot-0.002003.tar.gz, SLOYD, 2023; MetaCPAN )
Chart-GGPlot/lib/Chart/GGPlot/Backend/Plotly.pm ( view source; MetaCPAN )
 qw(show_plot);
use Chart::Plotly::Plot;
use Chart::Plotly::Image;

use Data::Munge qw(elem);
use JSON;
use List::AllUtils qw(pairmap pairwise uniq);
use Module::Load;
use Types::Standard qw(HashRef I
yout{$axis_name} = {
            range     => $range,
            zeroline  => JSON::false,
            autorange => JSON::false,

            (
                  ( not defined $el_axis_title or $el_a
text or $el_axis_text->is_blank )
                ? ( showticklabels => JSON::false, )
                : ( showticklabels => JSON::true, )
            ),
            (
                ( not defined $e
Chart-GGPlot ( S/SL/SLOYD/Chart-GGPlot-0.002003.tar.gz, SLOYD, 2023; MetaCPAN )
Chart-GGPlot/lib/Chart/GGPlot/Backend/Plotly/Geom/Boxplot.pm ( view source; MetaCPAN )
:pdl);

our $VERSION = '0.002003'; # VERSION

with qw(Chart::GGPlot::Backend::Plotly::Geom);

use JSON;
use List::AllUtils qw(max pairmap);
use Module::Load;

use Chart::GGPlot::Backend::Plotly::Util 
    => $marker,
        line       => $line,
        notched    => ( $params->at('notch') ? JSON::true : JSON::false ),
        notchwidth => $params->at('notchwidth'),
        hoverinfo  => ( $flip ?
Task-Dancer2 ( C/CR/CROMEDOME/Task-Dancer2-0.07.tar.gz, CROMEDOME, 2023; MetaCPAN )
Task-Dancer2/lib/Task/Dancer2.pm ( view source; MetaCPAN )
m L<Dancer2::Session::DatabasePlugin>

=item L<Dancer2::Session::DBIC>

=item L<Dancer2::Session::JSON>

=item L<Dancer2::Session::Memcached>

=item L<Dancer2::Session::MongoDB>

=item L<Dancer2::Sess
Alien-Plotly-Kaleido ( S/SL/SLOYD/Alien-Plotly-Kaleido-0.003.tar.gz, SLOYD, 2023; MetaCPAN )
Alien-Plotly-Kaleido/util/MyInstallUtil.pm ( view source; MetaCPAN )
re JSON;

    my $kaleido = File::Which::which('kaleido');
    if ($kaleido) {
        my $decode_json_safe = sub {
            my ($out) = @_;
            my $data;
            eval { $data = JSON::d
ecode_json($out); };
            $@ = '' if ($@);
            return $data;
        };

        my @cmd = ( $kaleido, 'plotly', '--disable-gpu', '--no-sandbox' );
        eval {
            require Ch
 ( not $data and not $t->is_expired ) {
                $h->pump;
                $data = $decode_json_safe->($out);
            }
            $h->finish;
        };
        if ($@) {
            warn
OpenAPI-Render ( M/ME/MERKYS/OpenAPI-Render-0.3.0.tar.gz, MERKYS, 2023; MetaCPAN )
OpenAPI-Render/lib/OpenAPI/Render.pm ( view source; MetaCPAN )
package OpenAPI::Render;

use strict;
use warnings;

use Clone qw( clone );
use JSON qw( decode_json );
use version;

# ABSTRACT: Render OpenAPI specifications as documents
our $VERSION = '0.3.0'; # V
 raw JSON or parsed data structure, constructs a C<OpenAPI::Render> object.
Does not modify input values.

=cut

sub new
{
    my( $class, $api ) = @_;

    if( ref $api ) {
        # Parsed JSON give
ing will modify it.
        $api = clone $api;
    } else {
        # Raw JSON given, need to parse.
        $api = decode_json $api;
    }

    my $self = { api => _dereference( $api, $api ) };

    
Dancer ( Y/YA/YANICK/Dancer-1.3521.tar.gz, YANICK, 2023; MetaCPAN )
Dancer/lib/Dancer/Cookbook.pod ( view source; MetaCPAN )
cer provides helpers to
serialize and deserialize for the following data formats:

=over 4

=item JSON

=item YAML

=item XML

=item Data::Dumper

=back

To activate this feature, you only have to set
he
format you require, for instance in your config.yml:

   serializer: JSON

Or right in your code:

   set serializer => 'JSON';

From now, all HashRefs or ArrayRefs returned by a route will be seri
Dancer ( Y/YA/YANICK/Dancer-1.3521.tar.gz, YANICK, 2023; MetaCPAN )
Dancer/lib/Dancer/Response.pm ( view source; MetaCPAN )


    # set the status
    $response->content_type('application/json');
    Dancer::SharedData->response->content_type('application/json');

Set or get the status of the current response object.

=hea
Dancer ( Y/YA/YANICK/Dancer-1.3521.tar.gz, YANICK, 2023; MetaCPAN )
Dancer/lib/Dancer/Config.pm ( view source; MetaCPAN )
g it into some 8bit
charset, for example).

Also, since automatically serialized JSON responses have
C<application/json> Content-Type, you should always encode them by
hand.

Can also be set with envi
Dancer ( Y/YA/YANICK/Dancer-1.3521.tar.gz, YANICK, 2023; MetaCPAN )
Dancer/lib/Dancer/Plugin/Ajax.pm ( view source; MetaCPAN )
ritten
with plugin setting 'content_type'.

Here is example to use JSON:

  plugins:
    'Ajax':
      content_type: 'application/json'

=head1 AUTHOR

This module has been written by Alexis Sukrieh <
Dancer ( Y/YA/YANICK/Dancer-1.3521.tar.gz, YANICK, 2023; MetaCPAN )
Dancer/lib/Dancer/Serializer.pm ( view source; MetaCPAN )
 # don't create a new serializer unless it's defined in the config
    # (else it's created using json, and that's *not* what we want)
    my $serializer_name = Dancer::App->current->setting('serializ
$serializer_name);
    return;
}

sub init {
    my ($class, $name, $config) = @_;
    $name ||= 'JSON';
    $_engine = Dancer::Engine->build('serializer' => $name, $config);
    return $_engine;
}

#
e:

    serializer: "YAML"

Or in the application code:

    # setting JSON as the default serializer
    set serializer => 'JSON';

In your routes you can access parameters just like any route.

When
Dancer ( Y/YA/YANICK/Dancer-1.3521.tar.gz, YANICK, 2023; MetaCPAN )
Dancer/lib/Dancer/Serializer/JSONP.pm ( view source; MetaCPAN )
package Dancer::Serializer::JSONP;
our $AUTHORITY = 'cpan:SUKRIA';
$Dancer::Serializer::JSONP::VERSION = '1.3521';
# ABSTRACT: serializer for handling JSONP data

use strict;
use warnings;
use Dancer:
:JSON';

sub serialize {
    my $self = shift;
	
	my $callback = Dancer::SharedData->request->params('query')->{callback};
	
	my $json = $self->SUPER::serialize(@_);
	
	return $callback . '(' . $json 
zer::JSONP - serializer for handling JSONP data

=head1 VERSION

version 1.3521

=head1 SYNOPSIS

=head1 DESCRIPTION

This class is a subclass of L<Dancer::Serializer::JSON> with support for JSONP.

I
Dancer ( Y/YA/YANICK/Dancer-1.3521.tar.gz, YANICK, 2023; MetaCPAN )
Dancer/lib/Dancer/Development.pod ( view source; MetaCPAN )
n the author tests (in F</xt>) against the built code.

=item $ dzil listdeps --json

List all the dependencies, in JSON.

=item $ dzil build --notgz

Build the code, but don't generate the tarball.

Dancer ( Y/YA/YANICK/Dancer-1.3521.tar.gz, YANICK, 2023; MetaCPAN )
Dancer/lib/Dancer/Engine.pm ( view source; MetaCPAN )
 VERSION

version 1.3521

=head1 SYNOPSIS

    my $engine = Dancer::Engine->build( Serializer => 'JSON', $configuration );

=head1 DESCRIPTION

Dancer has various engines such Serializer engines, Temp
t it inherits from this
class.

=head1 ATTRIBUTES

=head2 name

The name of the engine, such as I<JSON>, or I<Simple>.

=head2 type

The type of the engine, such as I<Serializer>, or I<Session>.

=hea
Dancer ( Y/YA/YANICK/Dancer-1.3521.tar.gz, YANICK, 2023; MetaCPAN )
Dancer/lib/Dancer/Serializer/Mutable.pm ( view source; MetaCPAN )
text/html'        => 'YAML',
    'text/xml'         => 'XML',
    'text/x-json'      => 'JSON',
    'application/json' => 'JSON',
};

my $loaded_serializer = {};
my $_content_type;

sub template_or_se
} 
            if $params && $params->{content_type};
    }
    push @content_types, 'application/json';

    # remove duplicates
    my %seen;
    return [ grep { not $seen{$_}++ } @content_types ];
 from the URL

=item

the B<accept> from the request headers

=item

The default is B<application/json>

=back

The content-type/serializer mapping that C<Dancer::Serializer::Mutable>
uses is

    ser
Test-CheckManifest ( R/RE/RENEEB/Test-CheckManifest-1.43.tar.gz, RENEEB, 2023; MetaCPAN )
Test-CheckManifest/lib/Test/CheckManifest.pm ( view source; MetaCPAN )
ded_files = qw(
    pm_to_blib Makefile META.yml Build pod2htmd.tmp META.json
    pod2htmi.tmp Build.bat .cvsignore MYMETA.json MYMETA.yml
);

sub import {
    my $self   = shift;
    my $caller = cal
Dancer ( Y/YA/YANICK/Dancer-1.3521.tar.gz, YANICK, 2023; MetaCPAN )
Dancer/lib/Dancer/Introduction.pod ( view source; MetaCPAN )
 an example of a route handler that will return a HashRef

    use Dancer;
    set serializer => 'JSON';

    get '/user/:id/' => sub {
        { foo => 42,
          number => 100234,
          list 
ot
the case by default - Dancer renders the response via the current
serializer.

Hence, with the JSON serializer set, the route handler above would result in a
content like the following:

    {"numb
ey dynamically depend on
Perl modules you may not have on your system.

=over 4

=item B<JSON>

requires L<JSON>

=item B<YAML>

requires L<YAML>

=item B<XML>

requires L<XML::Simple>

=item B<Mutabl

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