Group
Extension

Matches 35358

Jifty ( A/AL/ALEXMV/Jifty-1.50430.tar.gz, ALEXMV, 2015; MetaCPAN )
Jifty/lib/Jifty/Manual/jQueryMigrationGuide.pod ( view source; MetaCPAN )


=head2 JSON

jQuery does not ship with the JSON stringify function, but since it
neither altered the native Array, nor defined its own Hash, it's
acceptable and preferred to just use C<JSON.stringif
y> from C<json.js>.

From:

    // obj need to be one of those objects defined in C<prototype.js>
    obj.toJSON();

To:

    JSON.stringify( obj )

=head2 Effects

jQuery has a small set of default e
App-PAIA ( V/VO/VOJ/App-PAIA-0.30.tar.gz, VOJ, 2015; MetaCPAN )
App-PAIA/lib/App/PAIA/Agent.pm ( view source; MetaCPAN )
nt;
use strict;
use v5.10;

our $VERSION = '0.30';

use HTTP::Tiny 0.024;
use URI;
use App::PAIA::JSON;

sub new {
    my ($class, %options) = @_;
    bless {
        insecure => !!$options{insecure},
) // '';
    my $param   = shift // {};
    my $headers = { 
        Accept       => 'application/json',
        'User-Agent' => "App::PAIA/".($APP::PAIA::VERSION//'?'),
        @_ 
    };
    my $con
}

    if ($method eq 'POST') {
        $headers->{'Content-Type'} = 'application/json';
        $content = encode_json($param);
    } elsif (%$param) {
        $url->query_form(%$param);
    }

    $
Jifty ( A/AL/ALEXMV/Jifty-1.50430.tar.gz, ALEXMV, 2015; MetaCPAN )
Jifty/lib/Jifty/Plugin/SetupWizard/View.pm ( view source; MetaCPAN )
ote stuff in onfoo handlers...
    my $onchange = 'Jifty.update('
                 . Jifty::JSON::encode_json({
                    actions          => {},
                    action_arguments => {},
Jifty ( A/AL/ALEXMV/Jifty-1.50430.tar.gz, ALEXMV, 2015; MetaCPAN )
Jifty/lib/Jifty/Manual/Actions.pod ( view source; MetaCPAN )
lso automatically published as web services.
Clients can POST requests, usually using the YAML or JSON request
format.  See C<bin/service> for a trivial generic webservice client.

(XXX TODO More abou
App-PAIA ( V/VO/VOJ/App-PAIA-0.30.tar.gz, VOJ, 2015; MetaCPAN )
App-PAIA/lib/App/PAIA/Command/logout.pm ( view source; MetaCPAN )
;
use strict;
use v5.10;
use parent 'App::PAIA::Command';

our $VERSION = '0.30';

use App::PAIA::JSON;

sub _execute {
    my ($self, $opt, $args) = @_;

    if ($self->expired) {
        $self->logg
 
            "POST", "$auth/logout", { patron => $self->patron }
        );
        print encode_json($response);
    }

    $self->session->purge && $self->logger->("deleted session file");

    ret
Jifty ( A/AL/ALEXMV/Jifty-1.50430.tar.gz, ALEXMV, 2015; MetaCPAN )
Jifty/lib/Jifty/Manual/PageRegions.pod ( view source; MetaCPAN )
variables, to more closely imitate the state of a non-javascript
enabled client.  It constructs a JSON request based on that
information, and passes it off to the XML web-service endpoint on the
serve
Webqq-Qun ( S/SJ/SJDY/Webqq-Qun-1.5.tar.gz, SJDY, 2015; MetaCPAN )
Webqq-Qun/lib/Webqq/Qun/Operate.pm ( view source; MetaCPAN )
package Webqq::Qun::Operate;
use strict;
use JSON;
use Encode;
use Webqq::Util qw(gen_url gen_url2);
my %levelname;
sub get_token{
    my $self = shift;
    my $t = $self->search_cookie("skey");
    m
m/^jQuery18302889768735039979_1427194882987\((.*?)\);/; 
        my $json = JSON->new->utf8->decode($data);
        return if $json->{retcode}!=0;
    }
    return;
     
}
sub get_qun {
    my $self 
       my $json = JSON->new->utf8->decode($res->content);
        return  if  $json->{ec}!=0;
        $self->{data} = [];
        for my $t (qw(join manage create)){
            for(@{$json->{$t}}){
 
Jifty ( A/AL/ALEXMV/Jifty-1.50430.tar.gz, ALEXMV, 2015; MetaCPAN )
Jifty/lib/Jifty/Manual/UsingCSSandJS.pod ( view source; MetaCPAN )
and add Ajax interactions to your web pages.

=item C<JSON> L<http://json.org>

Hereby, major support for encoding and decoding data into the JSON
data format (similar to C<YAML>) is provided.

=item 
Jifty ( A/AL/ALEXMV/Jifty-1.50430.tar.gz, ALEXMV, 2015; MetaCPAN )
Jifty/lib/Jifty/Plugin/REST/Dispatcher.pm ( view source; MetaCPAN )
:Dispatcher -base;
use Jifty::YAML ();
use Jifty::JSON ();
use Data::Dumper ();
use XML::Simple;
use URI::Escape ();

before qr{^ (/=/ .*) \. (js|json|yml|yaml|perl|pl|xml|html) $}x => run {
    Jifty
ts:

    JSON, JS, YAML, XML, Perl, and HTML

and may be requested in such formats by sending an appropriate HTTP Accept: header
or appending one of the extensions to any resource:

    .json, .js, .y
rns the user's desired output format. Returns a hashref of:

    format: JSON, JS, YAML, XML, Perl, or HTML
    extension: json, js, yml, xml, pl, or html
    content_type: text/x-yaml; charset=UTF-8,
Jifty ( A/AL/ALEXMV/Jifty-1.50430.tar.gz, ALEXMV, 2015; MetaCPAN )
Jifty/lib/Jifty/Plugin/SinglePage.pm ( view source; MetaCPAN )
e_url', { 'continuation':{}, 'actions':{}, 'fragments':[{'mode':'Replace','args':@{[ Jifty::JSON::encode_json($args->{parameters})]},'region':'__page','path':'$url'}],'action_arguments':{}}, true);},
Mojolicious-Plugin-JSUrlFor ( K/KO/KOORCHIK/Mojolicious-Plugin-JSUrlFor-0.17.tar.gz, KOORCHIK, 2015; MetaCPAN )
Mojolicious-Plugin-JSUrlFor/lib/Mojolicious/Plugin/JSUrlFor.pm ( view source; MetaCPAN )
}

            my $json_routes = $c->render_to_string( json => \%names2paths );
            utf8::decode( $json_routes );

            my $js = <<"JS";
var mojolicious_routes = $json_routes;
function 

  # In your layout template
  <head>
  <%= js_url_for%>
  </head>

  # In your javascript
  $.getJSON( url_for( 'messages_show', {message_id: 123} ), params, function() { ... } )


  # Instead of hel
Plack-Middleware-DebugLogging ( M/MA/MATTP/Plack-Middleware-DebugLogging-0.001005.tar.gz, MATTP, 2015; MetaCPAN )
Plack-Middleware-DebugLogging/lib/Plack/Middleware/DebugLogging.pm ( view source; MetaCPAN )
   => 'XML::Simple',
    'text/x-yaml'        => 'YAML',
    'application/json'   => 'JSON',
    'text/x-json'        => 'JSON',
    'text/x-data-dumper' => 'Data::Dumper',
    'text/x-data-denter' =>
App-PAIA ( V/VO/VOJ/App-PAIA-0.30.tar.gz, VOJ, 2015; MetaCPAN )
App-PAIA/lib/App/PAIA/Command.pm ( view source; MetaCPAN )
5.10;

our $VERSION = '0.30';

use App::Cmd::Setup -command;
use App::PAIA::Agent;
use App::PAIA::JSON;
use App::PAIA::File;
use URI::Escape;
use URI;

# TODO: move option handling to App::PAIA

# Imp
 my ($response, $json) = $self->agent->request( $method, $url, $param, %headers );

    # handle request errors
    if (ref $json and defined $json->{error}) {
        my $msg = $json->{error};
      
  if (defined $json->{error_description}) {
            $msg .= ': '.$json->{error_description};
        }
        die "$msg\n";
    }

    if ($response->{status} ne '200') {
        my $msg = $respo
App-PAIA ( V/VO/VOJ/App-PAIA-0.30.tar.gz, VOJ, 2015; MetaCPAN )
App-PAIA/lib/App/PAIA.pm ( view source; MetaCPAN )
],
    ['config|c=s'   => "configuration file (default: ./paia.json)"],
    ['session|s=s'  => "session file (default: ./paia-session.json)"],
    ['verbose|v'    => "show what's going on internally"]
Jifty ( A/AL/ALEXMV/Jifty-1.50430.tar.gz, ALEXMV, 2015; MetaCPAN )
Jifty/lib/Jifty/Script/Po.pm ( view source; MetaCPAN )
ct::Plugin::PPI' => ['pm','pl'],
            'tt2' => [ ],
            'perl' => ['pl','pm','js','json'],
            'mason' => [ ] ,
        },
        verbose => 1,
);

use constant USE_GETTEXT_STY
ct/$lang.json";
        $logger->info("Generating $file");
        open my $fh, '>', $file or die "$file: $!";

        no strict 'refs';
        print $fh
            Jifty::JSON::encode_json( { map 
 with
   --dir              Additional directories to extract from
   --js               Generate json files from the current po files

   --help             brief help message
   --man              f
Jifty ( A/AL/ALEXMV/Jifty-1.50430.tar.gz, ALEXMV, 2015; MetaCPAN )
Jifty/lib/Jifty/Manual/Glossary.pod ( view source; MetaCPAN )
his most often comes from the browser as query
parameters, but may come from other sources as a L<JSON> or L<YAML> POST
request.  The answer to a request is a L</response>.  See L<Jifty::Request>.

=i
Mojo-MySQL5 ( H/HA/HARRYL/Mojo-MySQL5-0.09.tar.gz, HARRYL, 2015; MetaCPAN )
Mojo-MySQL5/README.pod ( view source; MetaCPAN )
alhost/db') };

  get '/' => sub {
    my $c  = shift;
    my $db = $c->mysql->db;
    $c->render(json => $db->query('select now() as time')->hash);
  };

  app->start;

Every database connection can 
App-PAIA ( V/VO/VOJ/App-PAIA-0.30.tar.gz, VOJ, 2015; MetaCPAN )
App-PAIA/lib/App/PAIA/Command/items.pm ( view source; MetaCPAN )
;
use strict;
use v5.10;
use parent 'App::PAIA::Command';

our $VERSION = '0.30';

use App::PAIA::JSON;

sub _execute {
    my ($self, $opt, $args) = @_;

    $self->core_request('GET', 'items');
}

1
App-PAIA ( V/VO/VOJ/App-PAIA-0.30.tar.gz, VOJ, 2015; MetaCPAN )
App-PAIA/lib/App/PAIA/Command/session.pm ( view source; MetaCPAN )
';

use App::PAIA::JSON;

sub _execute {
    my ($self, $opt, $args) = @_;

    if (defined $self->session->file ) {
        my $data = $self->session->load;
        say encode_json($data) if $self->a
App-PAIA ( V/VO/VOJ/App-PAIA-0.30.tar.gz, VOJ, 2015; MetaCPAN )
App-PAIA/lib/App/PAIA/Command/config.pm ( view source; MetaCPAN )
;
use strict;
use v5.10;
use parent 'App::PAIA::Command';

our $VERSION = '0.30';

use App::PAIA::JSON;

sub usage_desc {
    "%c config %o [ key [value] ]"
}

sub opt_spec {
    ['ini|i' => 'list con
 - show or modify configuration

=head1 DESCRIPTION

This command shows or modifies the current configuration. Configuration
is printed as JSON object or in INI-sytle as sorted key-value-pairs.

=cut

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