Group
Extension

Matches 35358

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/Google.pm ( view source; MetaCPAN )
   );

    if( $resp->is_success ) {
        my $user = $self->_stringify_json_booleans(
            JSON::MaybeXS::decode_json( $resp->decoded_content )
        );
        $session_data->{google}{use
JavaScript-Embedded ( C/CA/CAVAC/JavaScript-Embedded-2.7.2.tar.gz, CAVAC, 2022; MetaCPAN )
JavaScript-Embedded/lib/JavaScript/Embedded/C/FunctionsMap.pl ( view source; MetaCPAN )
C<json_decode>

see L<http://duktape.org/api.html#duk_json_decode>

=cut
*json_decode = \&aperl_duk_json_decode;

=item C<json_encode>

see L<http://duktape.org/api.html#duk_json_encode>

=cut
*json_e
ncode = \&aperl_duk_json_encode;

=item C<load_function>

see L<http://duktape.org/api.html#duk_load_function>

=cut
*load_function = \&aperl_duk_load_function;

=item C<map_string>

see L<http://dukt
JavaScript-Embedded ( C/CA/CAVAC/JavaScript-Embedded-2.7.2.tar.gz, CAVAC, 2022; MetaCPAN )
JavaScript-Embedded/lib/JavaScript/Embedded/C/lib/duktape.h ( view source; MetaCPAN )
ntext *ctx, duk_idx_t idx);
DUK_EXTERNAL_DECL const char *duk_json_encode(duk_context *ctx, duk_idx_t idx);
DUK_EXTERNAL_DECL void duk_json_decode(duk_context *ctx, duk_idx_t idx);
DUK_EXTERNAL_DECL v
WebService-ValidSign ( W/WA/WATERKIP/WebService-ValidSign-0.004.tar.gz, WATERKIP, 2022; MetaCPAN )
WebService-ValidSign/lib/WebService/ValidSign/API/Auth.pm ( view source; MetaCPAN )
      POST => $uri,
        [
            'Content-Type' => 'application/json',
            Accept         => 'application/json',
        ]
    );

    $request->header("Authorization", join(" ", "Bas
WebService-ValidSign ( W/WA/WATERKIP/WebService-ValidSign-0.004.tar.gz, WATERKIP, 2022; MetaCPAN )
WebService-ValidSign/lib/WebService/ValidSign/API.pm ( view source; MetaCPAN )
:Request;
use JSON qw(decode_json);
use URI;
use WebService::ValidSign::Types qw(
    WebServiceValidSignURI
    WebServiceValidSignAuthModule
);

requires qw(action_endpoint);

has json => (
    is  
    => 'ro',
    builder => 1,
    lazy    => 1,
);

sub _build_json {
    require JSON::XS;
    return JSON::XS->new->convert_blessed;
}

has auth => (
    is       => 'ro',
    required => 1,
    is
t = HTTP::Request->new(
        GET => $uri,
        [
            'Content-Type' => 'application/json',
        ]
    );

    $self->call_api_download(
        $request,
        sub {
            my 
WebService-ValidSign ( W/WA/WATERKIP/WebService-ValidSign-0.004.tar.gz, WATERKIP, 2022; MetaCPAN )
WebService-ValidSign/lib/WebService/ValidSign/Object.pm ( view source; MetaCPAN )
 return $orig->($class,
        map { lower_snake_case($_) => $args{$_} } keys %args);
};

sub TO_JSON {
    my $self = shift;
    my $meta = $self->meta;
    my %result;
    for my $attr ($meta->get_
RT-Extension-REST2 ( B/BP/BPS/RT-Extension-REST2-1.17.tar.gz, BPS, 2022; MetaCPAN )
RT-Extension-REST2/lib/RT/Extension/REST2.pm ( view source; MetaCPAN )

             "_url" : "XX_RT_URL_XX/REST/2.0/queue/1"
          }
       ]
    }

This format is JSON, which is a format for which many programming languages
provide libraries for parsing and generat
TP verb (C<POST> instead of C<GET>), a C<Content-Type>
header (to tell REST2 that your content is JSON instead of, say, XML),
and the fields for your new ticket such as Subject. Here is the curl
invoc
apped to multiple lines for readability.

    curl -X POST
         -H "Content-Type: application/json"
         -d '{ "Subject": "hello world" }'
         -H 'Authorization: token XX_TOKEN_XX'
      
WebService-ValidSign ( W/WA/WATERKIP/WebService-ValidSign-0.004.tar.gz, WATERKIP, 2022; MetaCPAN )
WebService-ValidSign/lib/WebService/ValidSign.pm ( view source; MetaCPAN )
ount> object. Build for you.

=back

=head1 BUGS

L<JSON::XS> 4.01 has a bug that causes JSON serialization errors. Please
upgrade or downgrade JSON::XS where needed.

=head1 ACKNOWLEDGEMENTS

This mo
App-JYJ ( I/IN/INGY/App-JYJ-0.0.2.tar.gz, INGY, 2022; MetaCPAN )
App-JYJ/lib/App/JYJ.pod ( view source; MetaCPAN )
ead1 App::JYJ

Convert JSON to YAML to JSON to...

=head2 Synopsis

    $ cat file.json | jyj             # YAML
    $ cat file.json | jyj | jyj       # JSON
    $ cat file.json | jyj | jyj |jyj  # YA
ol called C<jyj>.

It reads stdin.

If it looks like JSON, it prints the YAML dump of the JSON decoding.

If it looks like YAML, it prints the JSON encoding of the YAML load.

That's it.

=head2 Autho
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/Salesforce.pm ( view source; MetaCPAN )
   );

    if( $resp->is_success ) {
        my $user = $self->_stringify_json_booleans(
            JSON::MaybeXS::decode_json( $resp->decoded_content )
        );
        $session_data->{salesforce}
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/Facebook.pm ( view source; MetaCPAN )
   );

    if( $resp->is_success ) {
        my $user = $self->_stringify_json_booleans(
            JSON::MaybeXS::decode_json( $resp->content )
        );
        $session_data->{facebook}{user_info
App-JYJ ( I/IN/INGY/App-JYJ-0.0.2.tar.gz, INGY, 2022; MetaCPAN )
App-JYJ/lib/App/JYJ.pm ( view source; MetaCPAN )
nings;

our $VERSION = '0.0.2';

use JSON::PP;
use YAML::PP;
use IO::All;
use Mo;

sub run {
    my $input = io('-')->utf8->all;
    my $output;
    my $json = JSON::PP->new->pretty->indent_length(2);
[]/) {
        my $data = $json->decode($input);
        $output = $yaml->dump($data);
    }
    else {
        my $data = $yaml->load_string($input);
        $output = $json->encode($data);
    }
   
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/Odnoklassniki.pm ( view source; MetaCPAN )
t: '...'
#         application_key: '...'
#       method: 'users.getCurrentUser'
#       format: 'json'
#       fields: 'email,name,gender,birthday,location,uid,pic_full'
#
# to your providers configu
   );

    if( $resp->is_success ) {
        my $user = $self->_stringify_json_booleans(
            JSON::MaybeXS::decode_json( $resp->content )
        );
        $session_data->{odnoklassniki}{user
WebService-ValidSign ( W/WA/WATERKIP/WebService-ValidSign-0.004.tar.gz, WATERKIP, 2022; MetaCPAN )
WebService-ValidSign/lib/WebService/ValidSign/Object/Document.pm ( view source; MetaCPAN )
s       => 'rw',
    isa      => Str,
    required => 1,
);

has path => (is => 'ro');

around TO_JSON => sub {
    my $orig = shift;
    my $self = shift;

    my $rv = $orig->($self, @_);
    delete
RT-Extension-REST2 ( B/BP/BPS/RT-Extension-REST2-1.17.tar.gz, BPS, 2022; MetaCPAN )
RT-Extension-REST2/lib/RT/Extension/REST2/Resource/Message.pm ( view source; MetaCPAN )
E::Base64;

extends 'RT::Extension::REST2::Resource';
use RT::Extension::REST2::Util qw( error_as_json update_custom_fields update_role_members fix_custom_role_ids);

sub dispatch_rules {
    Path::Di
  { [ { 'application/json' => sub {} } ] }
sub content_types_accepted    { [ { 'text/plain' => 'add_message' }, { 'text/html' => 'add_message' }, { 'application/json' => 'from_json' }, { 'multipart/fo
  my $json_str = $self->request->parameters->{JSON};
    return error_as_json(
        $self->response,
        \400, "JSON is a required field for multipart/form-data")
            unless $json_str;
JSON-Parse ( B/BK/BKB/JSON-Parse-0.62.tar.gz, BKB, 2022; MetaCPAN )
JSON-Parse/lib/JSON/Parse.pod ( view source; MetaCPAN )
ing UTF-8

=head1 NAME

JSON::Parse - Parse JSON

=head1 SYNOPSIS

    
    use JSON::Parse 'parse_json';
    my $json = '["golden", "fleece"]';
    my $perl = parse_json ($json);
    # Same effect as
onvert JSON into Perl.

=head1 VERSION

This documents version 0.62 of JSON::Parse corresponding to
L<git commit d04630086f6c92fea720cba4568faa0cbbdde5a6|https://github.com/benkasminbullock/JSON-Parse
le for parsing JSON. (JSON means "JavaScript Object Notation"
and it is specified in L</RFC 8259>.)

JSON::Parse offers the function L</parse_json>, which takes a string
containing JSON, and returns a
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/Readable.pm ( view source; MetaCPAN )
urrent_user';
requires 'base_uri';

with 'RT::Extension::REST2::Resource::Record::WithETag';

use JSON ();
use RT::Extension::REST2::Util qw( serialize_record );
use Scalar::Util qw( blessed );

sub s
   {   'utf-8'   }

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

sub to_json {
    my $self = shift;
    return JSON::to_json($self->serialize, { pretty => 1 });
}

1;
RT-Extension-REST2 ( B/BP/BPS/RT-Extension-REST2-1.17.tar.gz, BPS, 2022; MetaCPAN )
RT-Extension-REST2/lib/RT/Extension/REST2/Resource/ObjectCustomFieldValue.pm ( view source; MetaCPAN )
;
use warnings;

use Moose;
use namespace::autoclean;
use RT::Extension::REST2::Util qw( error_as_json );

extends 'RT::Extension::REST2::Resource::Record';
with 'RT::Extension::REST2::Resource::Recor
   unless ($self->record->CustomFieldObj->Type =~ /^(?:Image|Binary)$/) {
        return error_as_json(
            $self->response,
            \400, "Only Image and Binary CustomFields can be downlo
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/ProcessPOSTasGET.pm ( view source; MetaCPAN )
s_code );

requires 'to_json';

sub process_post {
    my $self = shift;
    my $json = $self->to_json;
    unless (is_status_code($json)) {
        $self->response->body( $json );
        return 1;
 
   } else {
        return $json;
    }
}

1;
RT-Extension-REST2 ( B/BP/BPS/RT-Extension-REST2-1.17.tar.gz, BPS, 2022; MetaCPAN )
RT-Extension-REST2/lib/RT/Extension/REST2/Resource/Role/RequestBodyIsJSON.pm ( view source; MetaCPAN )
ce::Role::RequestBodyIsJSON;
use strict;
use warnings;

use MooseX::Role::Parameterized;
use namespace::autoclean;

use JSON ();
use RT::Extension::REST2::Util qw( error_as_json );
use Moose::Util::Ty
header('Content-Type') =~ /^application\/json/;

        my $json = eval {
            JSON::from_json($request->content)
        };
        if ($@ or not $json) {
            my $error = $@;
        
rror_as_json($self->response, undef, "JSON parse error: $error");
            return 1;
        }
        elsif (ref $json ne $P->type) {
            error_as_json($self->response, undef, "JSON object

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