Group
Extension

Matches 35358

RT-Extension-REST2 ( B/BP/BPS/RT-Extension-REST2-1.17.tar.gz, BPS, 2022; MetaCPAN )
RT-Extension-REST2/lib/RT/Extension/REST2/Resource/Searches.pm ( view source; MetaCPAN )
:Resource::Collection::ProcessPOSTasGET',
    'RT::Extension::REST2::Resource::Collection::QueryByJSON';

sub dispatch_rules {
    Path::Dispatcher::Rule::Regex->new(
        regex => qr{^/searches/?$
tributes' } },
    )
}

use Encode qw( decode_utf8 );
use RT::Extension::REST2::Util qw( error_as_json );
use RT::Search::Simple;

sub allowed_methods {
    [ 'GET', 'HEAD', 'POST' ]
}

sub limit_coll
RT-Extension-REST2 ( B/BP/BPS/RT-Extension-REST2-1.17.tar.gz, BPS, 2022; MetaCPAN )
RT-Extension-REST2/lib/RT/Extension/REST2/Resource/TicketsBulk.pm ( view source; MetaCPAN )
ST2::Resource::Role::RequestBodyIsJSON' =>
  { type => 'ARRAY' };

use RT::Extension::REST2::Util qw(expand_uid);
use RT::Extension::REST2::Resource::Ticket;
use JSON ();

sub dispatch_rules {
    Pat
{ 'application/json' => sub {} } ] }
sub content_types_accepted { [ { 'application/json' => 'from_json' } ] }

sub from_json {
    my $self   = shift;
    my $params = JSON::decode_json( $self->reques
     my @errors;

                    # Ported from RT::Extension::REST2::Resource::Message::from_json
                    if ( $param->{Attachments} ) {
                        foreach my $attachment
RT-Extension-REST2 ( B/BP/BPS/RT-Extension-REST2-1.17.tar.gz, BPS, 2022; MetaCPAN )
RT-Extension-REST2/lib/RT/Extension/REST2/Resource/Collection/QueryByJSON.pm ( view source; MetaCPAN )
ackage RT::Extension::REST2::Resource::Collection::QueryByJSON;
use strict;
use warnings;

use Moose::Role;
use namespace::autoclean;

use JSON ();

with (
    'RT::Extension::REST2::Resource::Collect
ion::ProcessPOSTasGET',
    'RT::Extension::REST2::Resource::Role::RequestBodyIsJSON'
         => { type => 'ARRAY' },
);

requires 'collection';

has 'query' => (
    is          => 'ro',
    isa    
f->request->param('query')
                : $self->request->content;
    return $content ? JSON::decode_json($content) : [];
}

sub allowed_methods {
    [ 'GET', 'POST' ]
}

sub searchable_fields {
RT-Extension-REST2 ( B/BP/BPS/RT-Extension-REST2-1.17.tar.gz, BPS, 2022; MetaCPAN )
RT-Extension-REST2/lib/RT/Extension/REST2/Resource/Record/Hypermedia.pm ( view source; MetaCPAN )
::autoclean;
use RT::Extension::REST2::Util qw(expand_uid expand_uri custom_fields_for);
use JSON qw(to_json);

sub hypermedia_links {
    my $self = shift;
    return [ $self->_self_link, $self->_rtl
RT-Extension-REST2 ( B/BP/BPS/RT-Extension-REST2-1.17.tar.gz, BPS, 2022; MetaCPAN )
RT-Extension-REST2/lib/RT/Extension/REST2/Middleware/ErrorAsJSON.pm ( view source; MetaCPAN )
eware::ErrorAsJSON;

use strict;
use warnings;

use base 'Plack::Middleware';

use Plack::Util;
use HTTP::Status qw(is_error status_message);
use RT::Extension::REST2::Util 'error_as_json';

sub call 
ader_get($headers, 'content-type');
        my $is_json = $content_type && $content_type =~ m/json/i;
        if ( is_error($status_code) && !$is_json ) {
            my $plack_res = Plack::Response->
RT-Extension-REST2 ( B/BP/BPS/RT-Extension-REST2-1.17.tar.gz, BPS, 2022; MetaCPAN )
RT-Extension-REST2/lib/RT/Extension/REST2/Resource/Collection.pm ( view source; MetaCPAN )
/json' => 'to_json' },
] }

sub to_json {
    my $self = shift;
    my $status = $self->search;
    return $status if is_status_code($status);
    return \400 unless $status;
    return JSON::to_json(
RT-Extension-REST2 ( B/BP/BPS/RT-Extension-REST2-1.17.tar.gz, BPS, 2022; MetaCPAN )
RT-Extension-REST2/lib/RT/Extension/REST2/Resource/Record/Writable.pm ( view source; MetaCPAN )
use warnings;

use Moose::Role;
use namespace::autoclean;
use JSON ();
use RT::Extension::REST2::Util qw( deserialize_record error_as_json expand_uid update_custom_fields update_role_members fix_custo
role_ids );
use List::MoreUtils 'uniq';

with 'RT::Extension::REST2::Resource::Role::RequestBodyIsJSON'
     => { type => 'HASH' };

requires 'record';
requires 'record_class';

sub post_is_create    
n/json' => 'from_json'}, { 'multipart/form-data' => 'from_multipart' } ] }

sub from_multipart {
    my $self = shift;
    my $json_str = $self->request->parameters->{JSON};
    return error_as_json(
RT-Extension-REST2 ( B/BP/BPS/RT-Extension-REST2-1.17.tar.gz, BPS, 2022; MetaCPAN )
RT-Extension-REST2/lib/RT/Extension/REST2/Resource/RT.pm ( view source; MetaCPAN )
{ ['GET'] }

sub content_types_provided { [{ 'application/json' => 'to_json' }] }

sub to_json {
    my $self = shift;
    return JSON::to_json({
        Version => $RT::VERSION,
        Plugins => [ 
JSON-Parse ( B/BK/BKB/JSON-Parse-0.62.tar.gz, BKB, 2022; MetaCPAN )
JSON-Parse/Parse.xs ( view source; MetaCPAN )
esenting the "null" in JSON. Although we're now
   using PL_sv_yes and PL_sv_no, we don't use PL_sv_undef, because
   perldoc perlguts says it's a bad idea. */

static SV * json_null;

/* Code starts 
icode.c"
#include "json-common.c"
#define PERLING
#include "json-perl.c"
#undef PERLING
#define TOKENING
#include "json-perl.c"
#undef TOKENING
#include "json-perl.c"
#include "json-entry-points.c"
#i
de "json-random-test.c"
#endif /* def TESTRANDOM */
#include "json-whitespace.c"
#ifdef NOPERL
#error "Cannot define NOPERL error when compiling Perl version"
#endif /* def NOPERL */

typedef json_par
RT-Extension-REST2 ( B/BP/BPS/RT-Extension-REST2-1.17.tar.gz, BPS, 2022; MetaCPAN )
RT-Extension-REST2/lib/RT/Extension/REST2/Resource/Tickets.pm ( view source; MetaCPAN )
:Tickets' } },
    )
}

use Encode qw( decode_utf8 );
use RT::Extension::REST2::Util qw( error_as_json expand_uid );
use RT::Search::Simple;

has 'query' => (
    is          => 'ro',
    isa         
elf = shift;
    my ($ok, $msg) = $self->collection->FromSQL( $self->query );
    return error_as_json( $self->response, 0, $msg ) unless $ok;
    super();
    return 1;
};

sub expand_field {
    my 
RT-Extension-REST2 ( B/BP/BPS/RT-Extension-REST2-1.17.tar.gz, BPS, 2022; MetaCPAN )
RT-Extension-REST2/lib/RT/Extension/REST2/Resource/UserGroups.pm ( view source; MetaCPAN )
Extension::REST2::Resource::Collection';
with 'RT::Extension::REST2::Resource::Role::RequestBodyIsJSON' =>
  {type => 'ARRAY'};

has 'user' => (
    is  => 'ro',
    isa => 'RT::User',
);

sub dispatc
, 'HEAD', 'DELETE', 'PUT');
    return \@ok;
}

sub content_types_accepted {[{'application/json' => 'from_json'}]}

sub delete_resource {
    my $self = shift;
    my $collection = $self->collection;
oup->DeleteMember($self->user->id);
    }
    return 1;
}

sub from_json {
    my $self   = shift;
    my $params = JSON::decode_json($self->request->content);
    my $user = $self->user;

    my $met
JSON-Parse ( B/BK/BKB/JSON-Parse-0.62.tar.gz, BKB, 2022; MetaCPAN )
JSON-Parse/lib/JSON/Tokenize.pod ( view source; MetaCPAN )


=head1 NAME

JSON::Tokenize - Tokenize JSON

=head1 SYNOPSIS

    
    use JSON::Tokenize ':all';
    
    my $input = '{"tuttie":["fruity", true, 100]}';
    my $token = tokenize_json ($input);
   
SION

This documents version 0.62 of JSON::Tokenize corresponding to
L<git commit d04630086f6c92fea720cba4568faa0cbbdde5a6|https://github.com/benkasminbullock/JSON-Parse/commit/d04630086f6c92fea720cba
dule for tokenizing a JSON string. "Tokenizing" means
breaking the string into individual tokens, without creating any Perl
structures. It uses the same underlying code as
L<JSON::Parse>. Tokenizing c
Dancer2-Plugin-Auth-OAuth ( B/BI/BIAFRA/Dancer2-Plugin-Auth-OAuth-0.20.tar.gz, BIAFRA, 2022; MetaCPAN )
Dancer2-Plugin-Auth-OAuth/lib/Dancer2/Plugin/Auth/OAuth/Provider/Github.pm ( view source; MetaCPAN )
   );

    if( $resp->is_success ) {
        my $user = $self->_stringify_json_booleans(
            JSON::MaybeXS::decode_json( $resp->content )
        );
        $session_data->{github}{user_info} 
JSON-JQ ( D/DO/DONGXU/JSON-JQ-0.09.tar.gz, DONGXU, 2022; MetaCPAN )
JSON-JQ/lib/JSON/JQ.xs ( view source; MetaCPAN )
// undef or JSON::null()
        return jv_null();
    }
    else if (SvROK(p_sv) && SvTYPE(SvRV(p_sv)) == SVt_IV) {
        // boolean: \0 or \1, equilvalent of $JSON::PP::true, $JSON::PP::false
sv)));
    }
    else if (SvROK(p_sv) && sv_derived_from(p_sv, "JSON::PP::Boolean")) {
        // boolean: $JSON::PP::true and $JSON::PP::false
        return jv_bool((bool)SvTRUE(SvRV(p_sv)));
 
 jval;
    }
    else {
        // not supported
        croak("cannot convert perl object to json format: SvTYPE == %i", SvTYPE(p_sv));
    }
    // NOREACH
}

void * my_jv_output(pTHX_ jv j
JSON-Parse ( B/BK/BKB/JSON-Parse-0.62.tar.gz, BKB, 2022; MetaCPAN )
JSON-Parse/lib/JSON/Whitespace.pod ( view source; MetaCPAN )

=encoding UTF-8

=head1 NAME

JSON::Whitespace - Alter the insignificant whitespace of JSON

=head1 SYNOPSIS

    use JSON::Whitespace ':all';
    
    my $in = <<EOF;
    {
                "animals"
  "moons":{
                        "🌑":0
                }
        }
    EOF
    my $minify = json_minify ($in);
    print $minify;


This outputs

    {"animals":{"kingkong":"🦍"},"baka":["ド
ION

This documents version 0.62 of JSON::Whitespace corresponding to
L<git commit d04630086f6c92fea720cba4568faa0cbbdde5a6|https://github.com/benkasminbullock/JSON-Parse/commit/d04630086f6c92fea720cb
Dancer2-Plugin-Auth-OAuth ( B/BI/BIAFRA/Dancer2-Plugin-Auth-OAuth-0.20.tar.gz, BIAFRA, 2022; MetaCPAN )
Dancer2-Plugin-Auth-OAuth/lib/Dancer2/Plugin/Auth/OAuth/Provider/Linkedin.pm ( view source; MetaCPAN )
in.com/oauth/v2/authorization",
        user_info => "https://api.linkedin.com/v1/people/~?format=json",
    },
    query_params => {
        authorize => {
            response_type => 'code',
      
   );

    if( $resp->is_success ) {
        my $user = $self->_stringify_json_booleans(
            JSON::MaybeXS::decode_json( $resp->decoded_content )
        );
        $session_data->{linkedin}{u
App-Dochazka-REST ( S/SM/SMITHFARM/App-Dochazka-REST-0.559.tar.gz, SMITHFARM, 2022; MetaCPAN )
App-Dochazka-REST/lib/App/Dochazka/REST/Auth.pm ( view source; MetaCPAN )
uth_status->payload;
            $self->push_onto_context( { 
                current => $emp->TO_JSON,
                current_obj => $emp,
                current_priv => $emp->priv( $dbix_conn ),
 
::Dochazka::REST::Model::Employee" );
    $self->push_onto_context( {
        current => $emp->TO_JSON,
        current_obj => $emp,
        current_priv => $emp->priv( $dbix_conn ),
        dbix_conn
Catmandu-Template ( V/VP/VPEIL/Catmandu-Template-0.14.tar.gz, VPEIL, 2022; MetaCPAN )
Catmandu-Template/lib/Catmandu/Exporter/Template.pm ( view source; MetaCPAN )
 # From the command line
    echo '{"colors":["red","green","blue"]}' | 
        catmandu convert JSON to Template --template `pwd`/xml.tt

    where xml.tt like:

    <colors>
    [% FOREACH c IN col
App-Dochazka-REST ( S/SM/SMITHFARM/App-Dochazka-REST-0.559.tar.gz, SMITHFARM, 2022; MetaCPAN )
App-Dochazka-REST/lib/App/Dochazka/REST/Dispatch.pm ( view source; MetaCPAN )
    }

Note that it should be possible to set a property to null:

    { "fullname" : null }

The JSON will be converted into a Perl hashref, of course, and that will
be handed off to the DBI for inse
und some employee objects
    foreach my $emp ( @{ $status->payload } ) {
        $emp = $emp->TO_JSON;
    }
    return $status;
}


=head2 Genreport handlers

=head3 handler_genreport

Handler for t
ntervals converted" );

    #
    # spawn Schedule object
    my @ARGS = ( 'schedule' => $intvls->json );
    if ( my $scode = $context->{'request_entity'}->{'scode'} ) {
        push @ARGS, ( 'scode'
App-Dochazka-REST ( S/SM/SMITHFARM/App-Dochazka-REST-0.559.tar.gz, SMITHFARM, 2022; MetaCPAN )
App-Dochazka-REST/lib/App/Dochazka/REST/Docs/Resources.pm ( view source; MetaCPAN )
o this
activity.

=back


=back

=head2 C<< bugreport >>


=over

Allowed methods: GET

Returns a JSON structure containing instructions for reporting bugs.


=back

=head2 C<< component >>


=over

A
qeuest for one of
these subresources, including the resource name in the request
entity as a bare JSON string (i.e. in double quotes).


=back

=head2 C<< docu/html >>


=over

Allowed methods: POST

a new schedule from those intervals or verify that an equivalent
schedule already exists.

Sample JSON:

    { "schedule" : [
        "[2014-09-22 08:00, 2014-09-22 12:00)",
        "[2014-09-22 12:30

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