Group
Extension

Matches 35359

zhangbo-NLP-plugin_eng ( Z/ZH/ZHANGBO/zhangbo-NLP-plugin_eng-0.002.tar.gz, ZHANGBO, 2015; MetaCPAN )
zhangbo-NLP-plugin_eng/lib/zhangbo/NLP/engine_article2_jieba_babel_multi_2.2_gongan_144.pl ( view source; MetaCPAN )
#!/usr/bin/perl
use POE qw(Component::Server::TCP);
#use JSON::XS;
 use Clone qw(clone);



#use MongoDB;
#use Smart::Comments;
#use lib "/home/wuyabo/shell/";
#use Conn_mongo_jc;
#use Data::Dumper;
#
zhangbo-NLP-plugin_eng ( Z/ZH/ZHANGBO/zhangbo-NLP-plugin_eng-0.002.tar.gz, ZHANGBO, 2015; MetaCPAN )
zhangbo-NLP-plugin_eng/lib/zhangbo/NLP/engine_article2_jieba_babel_multi_2.2_gongan_ok.pl ( view source; MetaCPAN )
#!/usr/bin/perl
use POE qw(Component::Server::TCP);
#use JSON::XS;
 use Clone qw(clone);



#use MongoDB;
#use Smart::Comments;
#use lib "/home/wuyabo/shell/";
#use Conn_mongo_jc;
#use Data::Dumper;
#
WebAPI-DBIC ( T/TI/TIMB/WebAPI-DBIC-0.004002.tar.gz, TIMB, 2015; MetaCPAN )
WebAPI-DBIC/lib/WebAPI/DBIC/Resource/GenericSet.pm ( view source; MetaCPAN )
 # Enable JSON API support:
        'WebAPI::DBIC::Resource::JSONAPI::Role::DBIC', # XXX move out?
        'WebAPI::DBIC::Resource::JSONAPI::Role::Set',
        'WebAPI::DBIC::Resource::JSONAPI::Role:
WebAPI-DBIC ( T/TI/TIMB/WebAPI-DBIC-0.004002.tar.gz, TIMB, 2015; MetaCPAN )
WebAPI-DBIC/lib/WebAPI/DBIC/Resource/JSONAPI.pm ( view source; MetaCPAN )
kage WebAPI::DBIC::Resource::JSONAPI;
$WebAPI::DBIC::Resource::JSONAPI::VERSION = '0.004002';

1;

__END__

=pod

=encoding UTF-8

=head1 NAME

WebAPI::DBIC::Resource::JSONAPI

=head1 VERSION

version
bAPI::DBIC::Resource::JSONAPI - JSON API support for WebAPI::DBIC

=head2 Media Type

These roles respond to the C<application/vnd.api+json> media type.

=head2 JSONAPI

The JSON API media type is des
compromising readability, flexibility, and discoverability.

See L<http://jsonapi.org/> for more details.

Development of JSON API support for WebAPI::DBIC has stalled due to instability
of the specif
WebAPI-DBIC ( T/TI/TIMB/WebAPI-DBIC-0.004002.tar.gz, TIMB, 2015; MetaCPAN )
WebAPI-DBIC/lib/WebAPI/DBIC.pm ( view source; MetaCPAN )


WebAPI::DBIC (or "WAPID" for short) provides the parts you need to build a
feature-rich RESTful JSON web service API backed by DBIx::Class schemas.

WebAPI::DBIC features include:

* Built as fine-g
ding ActiveModel / Ember-Data
(C<application/json>), JSON API (C<application/vnd.api+json>)
and HAL (C<application/hal+json>).
The Collection+JSON and JSON-LD hypermedia types could be added in future
dia type' of a request, and the desired response. In the case of JSON
types, the media type defines not only that the content is a JSON data structure,
but the semantics (meaning) of the the scructure
WebAPI-DBIC ( T/TI/TIMB/WebAPI-DBIC-0.004002.tar.gz, TIMB, 2015; MetaCPAN )
WebAPI-DBIC/lib/WebAPI/DBIC/Resource/GenericItem.pm ( view source; MetaCPAN )

        # Enable JSON API support:
        'WebAPI::DBIC::Resource::JSONAPI::Role::DBIC',
        'WebAPI::DBIC::Resource::JSONAPI::Role::Item',
        'WebAPI::DBIC::Resource::JSONAPI::Role::ItemWr
WebAPI-DBIC ( T/TI/TIMB/WebAPI-DBIC-0.004002.tar.gz, TIMB, 2015; MetaCPAN )
WebAPI-DBIC/lib/WebAPI/DBIC/Resource/HAL.pm ( view source; MetaCPAN )
 type (or HAL for short)
is a simple JSON format that gives a consistent and easy way to hyperlink
between resources in your API. It uses the C<application/hal+json> media type.

Adopting HAL makes th
gramming languages. It's also simple
enough that you can just deal with it as you would any other JSON.

See L<http://stateless.co/hal_specification.html>
for more details of the specification.

=head
WebAPI-DBIC ( T/TI/TIMB/WebAPI-DBIC-0.004002.tar.gz, TIMB, 2015; MetaCPAN )
WebAPI-DBIC/lib/WebAPI/DBIC/Resource/Role/SetWritable.pm ( view source; MetaCPAN )
e Moo::Role;


requires 'render_set_as_plain';
requires 'render_item_into_body';
requires 'decode_json';
requires 'set';
requires 'prefetch';
requires 'writable';
requires 'path_for_item';
requires 'a
=> 'lazy',
);

sub _build_content_types_accepted {
    return [ {'application/vnd.wapid+json' => 'from_plain_json'} ]
}

around 'allowed_methods' => sub {
    my $orig = shift;
    my $self = shift;
 
 create_path_after_handler { return 1 }


sub from_plain_json {
    my $self = shift;
    my $item = $self->create_resource( $self->decode_json($self->request->content) );
    return $self->item($item
WebAPI-DBIC ( T/TI/TIMB/WebAPI-DBIC-0.004002.tar.gz, TIMB, 2015; MetaCPAN )
WebAPI-DBIC/lib/WebAPI/DBIC/Resource/Role/Root.pm ( view source; MetaCPAN )
equires 'encode_json';


has content_types_provided => (
    is => 'lazy',
);

sub _build_content_types_provided {
    return [
        { 'application/vnd.wapid+json' => 'to_plain_json' },
        { '
path");
    return \302;
}


sub to_plain_json {
    return $_[0]->encode_json($_[0]->render_root_as_plain());
}


sub render_root_as_plain { # informal JSON description, XXX liable to change
    my 
HEAD requests for requests representing the root resource, e.g. C</>.

Supports the C<application/json> content type.

=head1 NAME

WebAPI::DBIC::Resource::Role::Root - methods to handle requests for 
WebAPI-DBIC ( T/TI/TIMB/WebAPI-DBIC-0.004002.tar.gz, TIMB, 2015; MetaCPAN )
WebAPI-DBIC/lib/WebAPI/DBIC/Resource/Role/DBIC.pm ( view source; MetaCPAN )
rce::Role::DBIC::VERSION = '0.004002';

use Carp qw(croak confess);
use Devel::Dwarn;
use JSON::MaybeXS qw(JSON);

use Moo::Role;


requires 'uri_for';
requires 'throwable';
requires 'request';
requir
request->headers->header('Accept') =~ /hal\+json/) {
        $body = $item_resource->to_json_as_hal;
    }
    else {
        $body = $item_resource->to_json_as_plain;
    }

    $self->response->body
s = $self->request->query_parameters;
    my @params = (%$override_params);

    # XXX turns 'foo~json' into 'foo', and 'me.bar' into 'me'.
    my %override_param_basenames = map { (split(/\W/,$_,2))[
Geo-USCensus-Geocoding ( M/MW/MWELLS/Geo-USCensus-Geocoding-0.01.tar.gz, MWELLS, 2015; MetaCPAN )
Geo-USCensus-Geocoding/Geocoding.pm ( view source; MetaCPAN )
rks
# http://geocoding.geo.census.gov/geocoder/vintages?benchmark=<id>
# with Accept: application/json

sub query {
  my $class = shift;
  my %opt = (
    returntype => 'geographies',
    benchmark =>
WebAPI-DBIC ( T/TI/TIMB/WebAPI-DBIC-0.004002.tar.gz, TIMB, 2015; MetaCPAN )
WebAPI-DBIC/lib/WebAPI/DBIC/Resource/Role/DBICException.pm ( view source; MetaCPAN )
004002';

use Carp qw(croak confess);
use Scalar::Util qw(blessed);
use Devel::Dwarn;
use JSON::MaybeXS qw(JSON);

use Moo::Role;


requires 'response';


sub finish_request {
    my ($self, $metadata
e formal error structure, such as
        # application/vnd.error+json => https://github.com/blongden/vnd.error
        my $json = JSON->new->ascii->pretty;
        my $response = $self->response;
   
;
        my $body = $json->encode($error_data);
        $response->body($body);
        $response->content_length(length $body);
        $response->content_type('application/json');
    }
    else {
WebAPI-DBIC ( T/TI/TIMB/WebAPI-DBIC-0.004002.tar.gz, TIMB, 2015; MetaCPAN )
WebAPI-DBIC/data_service_api.pod ( view source; MetaCPAN )
andling exceptions.

Specifically it should provide sufficient information to the client, via the
JSON response, to enable the client to update the form to indicate *which*
field(s) are associated wit
field information if possible.
Note that this may require some mapping of database field names to json entity
type field names.


=head1 CACHING

Implementing caching is easy. Implementing efficient c
-about-edge-side-includes/
    http://stackoverflow.com/questions/11781576/most-secure-javascript-json-inline-technique

Also look into "Surrogate-Capability & Surrogate- Control headers for ESI based
zhangbo-NLP-plugin_eng ( Z/ZH/ZHANGBO/zhangbo-NLP-plugin_eng-0.002.tar.gz, ZHANGBO, 2015; MetaCPAN )
zhangbo-NLP-plugin_eng/lib/zhangbo/NLP/eng_search_gouwei.pl ( view source; MetaCPAN )
ect;
use IO::Socket::INET;
use lib "./";
use plugin_eng;
use POE qw(Component::Server::TCP);
#use JSON::XS;
 use Clone qw(clone);
use Encode;





#use MongoDB;
use Smart::Comments;
#use Conn_mongo_jc
zhangbo-NLP-plugin_eng ( Z/ZH/ZHANGBO/zhangbo-NLP-plugin_eng-0.002.tar.gz, ZHANGBO, 2015; MetaCPAN )
zhangbo-NLP-plugin_eng/lib/zhangbo/NLP/eng_search0308.pl ( view source; MetaCPAN )
ect;
use IO::Socket::INET;
use lib "./";
use plugin_eng;
use POE qw(Component::Server::TCP);
#use JSON::XS;
 use Clone qw(clone);
use Encode;





#use MongoDB;
use Smart::Comments;
#use Conn_mongo_jc
zhangbo-NLP-plugin_eng ( Z/ZH/ZHANGBO/zhangbo-NLP-plugin_eng-0.002.tar.gz, ZHANGBO, 2015; MetaCPAN )
zhangbo-NLP-plugin_eng/lib/zhangbo/NLP/engine_sim_wa_article2_ok.pl ( view source; MetaCPAN )
#!/usr/bin/perl
#use JSON::XS;
 use Clone qw(clone);



use MongoDB;
use Smart::Comments;
use lib "/home/wuyabo/shell/";
use Conn_mongo_jc;
use Data::Dumper;
use IO::File;
#use Add_info;

open(FDst,"s
zhangbo-NLP-plugin_eng ( Z/ZH/ZHANGBO/zhangbo-NLP-plugin_eng-0.002.tar.gz, ZHANGBO, 2015; MetaCPAN )
zhangbo-NLP-plugin_eng/lib/zhangbo/NLP/engine_rea_zhonto.pl ( view source; MetaCPAN )
#!/usr/bin/perl
#use JSON::XS;
 use Clone qw(clone);
use MongoDB;
use Smart::Comments;
use lib "/home/wuyabo/shell/";
use Conn_mongo_jc;
use Data::Dumper;
use IO::File;
#use Add_info;

open(FDst,"stop
zhangbo-NLP-plugin_eng ( Z/ZH/ZHANGBO/zhangbo-NLP-plugin_eng-0.002.tar.gz, ZHANGBO, 2015; MetaCPAN )
zhangbo-NLP-plugin_eng/lib/zhangbo/NLP/sim_sy3.pl ( view source; MetaCPAN )
#!/usr/bin/perl
#use JSON::XS;
 use Clone qw(clone);



use MongoDB;
use Smart::Comments;
use lib "/home/wyb/shell/";
use Conn_mongo_jc;
use Data::Dumper;
use IO::File;
#use Add_info;


# http://poe.p
zhangbo-NLP-plugin_eng ( Z/ZH/ZHANGBO/zhangbo-NLP-plugin_eng-0.002.tar.gz, ZHANGBO, 2015; MetaCPAN )
zhangbo-NLP-plugin_eng/lib/zhangbo/NLP/engine_article2_jieba_babel_multi_2.2_gongan.pl ( view source; MetaCPAN )
#!/usr/bin/perl
use POE qw(Component::Server::TCP);
#use JSON::XS;
 use Clone qw(clone);



#use MongoDB;
#use Smart::Comments;
#use lib "/home/wuyabo/shell/";
#use Conn_mongo_jc;
#use Data::Dumper;
#
zhangbo-NLP-plugin_eng ( Z/ZH/ZHANGBO/zhangbo-NLP-plugin_eng-0.002.tar.gz, ZHANGBO, 2015; MetaCPAN )
zhangbo-NLP-plugin_eng/lib/zhangbo/NLP/eng_org.pl ( view source; MetaCPAN )
ect;
use IO::Socket::INET;
use lib "./";
use plugin_eng;
use POE qw(Component::Server::TCP);
#use JSON::XS;
 use Clone qw(clone);
use Encode;





#use MongoDB;
use Smart::Comments;
#use Conn_mongo_jc

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