Group
Extension

Matches 35359

JsonSQL ( H/HO/HOEFLERB/JsonSQL-0.41.tar.gz, HOEFLERB, 2017; MetaCPAN )
JsonSQL/lib/JsonSQL/Validator.pm ( view source; MetaCPAN )
 ABSTRACT: JSON schema validation module. Returns a JsonSQL::Validator object for validating a JSON string against a pre-defined schema.


use strict;
use warnings;
use 5.014;

package JsonSQL::Valida
JSON::Validator;
use JSON::Parse qw( assert_valid_json parse_json );
use List::Util qw( any );

use JsonSQL::Schemas::Schema;
use JsonSQL::Error;
#use Data::Dumper;



sub new {
    my ( $class, $json
ified JSON schema.
    my $schema = JsonSQL::Schemas::Schema->load_schema($jsonSchema);
    if ( eval { $schema->is_error } ) {
        return JsonSQL::Error->new("validate", "Error loading JSON schem
JsonSQL ( H/HO/HOEFLERB/JsonSQL-0.41.tar.gz, HOEFLERB, 2017; MetaCPAN )
JsonSQL/lib/JsonSQL/Error.pm ( view source; MetaCPAN )
Defines an error object to be used at various stages of JSON validation and SQL generation.


use strict;
use warnings;
use 5.014;

package JsonSQL::Error;

our $VERSION = '0.41'; # VERSION



sub new
 NAME

JsonSQL::Error - Defines an error object to be used at various stages of JSON validation and SQL generation.

=head1 VERSION

version 0.41

=head1 SYNOPSIS

To use this:

    return JsonSQL::Er
ptions/>

=head1 METHODS

=head2 Constructor new($type, $message)

Instantiates and returns a new JsonSQL::Error object.

    $type      => Any string to group error messages by.
    $message   => The
JsonSQL ( H/HO/HOEFLERB/JsonSQL-0.41.tar.gz, HOEFLERB, 2017; MetaCPAN )
JsonSQL/lib/JsonSQL/Query/Select.pm ( view source; MetaCPAN )
# ABSTRACT: JsonSQL::Query::Select object. Stores a Perl representation of a SELECT statement created from a JSON string.



use strict;
use warnings;
use 5.014;

package JsonSQL::Query::Select;

our 
e qw( JsonSQL::Query::Query );

use JsonSQL::Validator;
use JsonSQL::Error;
use JsonSQL::Param::Fields;
use JsonSQL::Param::Field;
use JsonSQL::Param::Tables;
use JsonSQL::Param::Joins;
use JsonSQL::P
aram::ConditionDispatcher;
use JsonSQL::Param::OrderBy;

# Using this as a crutch for now, but will deprecate at some point.
use SQL::Maker::Select;

#use Data::Dumper;
#use constant DEBUG => 0; # tog
JsonSQL ( H/HO/HOEFLERB/JsonSQL-0.41.tar.gz, HOEFLERB, 2017; MetaCPAN )
JsonSQL/lib/JsonSQL/Param/Order.pm ( view source; MetaCPAN )
# ABSTRACT: JsonSQL::Param::Order object. Stores a Perl representation of an SQL ORDER BY clause for use in JsonSQL::Query objects.



use strict;
use warnings;
use 5.014;

package JsonSQL::Param::Ord
$VERSION = '0.41'; # VERSION

use List::Util qw( any );

use JsonSQL::Param::Field;
use JsonSQL::Error;


## These are validated by the JSON schema, but an extra check doesn't hurt.
my @validDirs = ('
    
    my $orderField = JsonSQL::Param::Field->new($orderhashref->{field}, $queryObj, $default_table_rules);
    if ( eval { $orderField->is_error } ) {
        return JsonSQL::Error->new("invalid_f
JsonSQL ( H/HO/HOEFLERB/JsonSQL-0.41.tar.gz, HOEFLERB, 2017; MetaCPAN )
JsonSQL/lib/JsonSQL/Query/Insert.pm ( view source; MetaCPAN )
# ABSTRACT: JsonSQL::Query::Insert object. Stores a Perl representation of a set of INSERT statements created from a JSON string.



use strict;
use warnings;
use 5.014;

package JsonSQL::Query::Inser
 # VERSION

use base qw( JsonSQL::Query::Query );

use JsonSQL::Validator;
use JsonSQL::Error;
use JsonSQL::Param::Insert;



sub new {
    my ( $class, $query_rulesets, $json_query, $quote_char ) = @
 from JsonSQL::Query::Query base class.
    my $self = $class->SUPER::new($query_rulesets, 'insert', $quote_char);
    if ( eval { $self->is_error } ) {
        return (0, "Could not create JsonSQL IN
JsonSQL ( H/HO/HOEFLERB/JsonSQL-0.41.tar.gz, HOEFLERB, 2017; MetaCPAN )
JsonSQL/lib/JsonSQL/Schemas/Schema.pm ( view source; MetaCPAN )
# ABSTRACT: JSON schema base class. Used as a dispatcher for loading JSON schema objects used by JsonSQL::Validator.


use strict;
use warnings;
use 5.014;

package JsonSQL::Schemas::Schema;

our $VER
SION = '0.41'; # VERSION

use Class::Load qw( try_load_class );
use JSON::Parse qw( parse_json );

use JsonSQL::Error;



sub new {
    my $class = shift;
    
    my $self = {};
    
    bless $self,
class;
    return $self;
}


sub load_schema {
    my ( $caller, $jsonSchema ) = @_;
    
    my $class = "JsonSQL::Schemas::" . $jsonSchema;
    
    my ( $success, $err ) = try_load_class($class);
 
JsonSQL ( H/HO/HOEFLERB/JsonSQL-0.41.tar.gz, HOEFLERB, 2017; MetaCPAN )
JsonSQL/lib/JsonSQL/Schemas/insert.pm ( view source; MetaCPAN )
ACT: JsonSQL 'insert' JSON schema.


use strict;
use warnings;
use 5.014;

package JsonSQL::Schemas::insert;

our $VERSION = '0.41'; # VERSION

use base qw( JsonSQL::Schemas::Schema );



my $jsonSche
QL Insert Schema",
    "id": "sqlInsertSchema",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "description": "JSON schema to describe an SQL INSERT",
    "type": "object",
    "propert
SUPER::new();

    $self->{_json} = $jsonSchema;
    
    return $self;
}


1;

__END__

=pod

=encoding UTF-8

=head1 NAME

JsonSQL::Schemas::insert - JsonSQL 'insert' JSON schema.

=head1 VERSION

v
JsonSQL ( H/HO/HOEFLERB/JsonSQL-0.41.tar.gz, HOEFLERB, 2017; MetaCPAN )
JsonSQL/lib/JsonSQL/Schemas/select.pm ( view source; MetaCPAN )
ACT: JsonSQL 'select' JSON schema.


use strict;
use warnings;
use 5.014;

package JsonSQL::Schemas::select;

our $VERSION = '0.41'; # VERSION

use base qw( JsonSQL::Schemas::Schema );



my $jsonSche
QL Select Schema",
    "id": "sqlSelectSchema",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "description": "JSON schema to describe an SQL SELECT query",
    "type": "object",
    "p
SUPER::new();

    $self->{_json} = $jsonSchema;
    
    return $self;
}


1;

__END__

=pod

=encoding UTF-8

=head1 NAME

JsonSQL::Schemas::select - JsonSQL 'select' JSON schema.

=head1 VERSION

v
Dancer2-Plugin-REST ( Y/YA/YANICK/Dancer2-Plugin-REST-1.02.tar.gz, YANICK, 2017; MetaCPAN )
Dancer2-Plugin-REST/lib/Dancer2/Plugin/REST.pm ( view source; MetaCPAN )
rep /;

my %content_types = (
    yaml => 'text/x-yaml',
    yml  => 'text/x-yaml',
    json => 'application/json',
    dump => 'text/x-data-dumper',
    ''   => 'text/html',
);

# TODO check if we us
\w+)} => sub {
        User->find(captures->{id});
    };

    # curl http://mywebservice/user/42.json
    { "id": 42, "name": "John Foo", email: "john.foo@example.com"}

    # curl http://mywebservic
*> serializer. Unless overriden in the 
configuration, it defaults to:

    serializers:
      json: JSON
      yml:  YAML
      dump: Dumper

=head1 KEYWORDS

=head2 prepare_serializer_for_format

Wh
MooseX-Storage-IO-AmazonDynamoDB ( S/SC/SCALDWELL/MooseX-Storage-IO-AmazonDynamoDB-0.08.tar.gz, SCALDWELL, 2017; MetaCPAN )
MooseX-Storage-IO-AmazonDynamoDB/lib/MooseX/Storage/IO/AmazonDynamoDB.pm ( view source; MetaCPAN )
torage::IO::AmazonDynamoDB;

use strict;
use 5.014;
our $VERSION = '0.08';

use Data::Dumper;
use JSON::MaybeXS;
use MooseX::Role::Parameterized;
use MooseX::Storage;
use PawsX::DynamoDB::DocumentClie
ze JSON values
        foreach my $key (keys %$packed) {
            my $value = $packed->{$key};
            if ($value && $value =~ /^\$json\$v(\d+)\$:(.+)$/) {
                my ($version, $json) 
= ($1, $2);
                state $coder = JSON::MaybeXS->new(
                    utf8         => 1,
                    canonical    => 1,
                    allow_nonref => 1,
                );
 
Net-SolarWinds-REST ( A/AK/AKALINUX/Net-SolarWinds-REST-1.22.tar.gz, AKALINUX, 2017; MetaCPAN )
Net-SolarWinds-REST/lib/Net/SolarWinds/REST/Batch.pm ( view source; MetaCPAN )
t->get_data;
  my $node_id=$node->{NodeID};

  return $self->UpdateNodeProps($node_id,UnManaged=>&JSON::true);
}

=item * my $result=$self->get_management_config($thing);

Programatic way build a refr
mes,
    custom_properties=>$custom_props,
    templates=>$templates,
  };

  $config->{replace}=&JSON::false;
  return $self->RESULT_CLASS->new_true($config);
}

=item * my $result=$self->get_poller_
WWW-Wikipedia-LangTitles ( B/BK/BKB/WWW-Wikipedia-LangTitles-0.04.tar.gz, BKB, 2017; MetaCPAN )
WWW-Wikipedia-LangTitles/lib/WWW/Wikipedia/LangTitles.pod ( view source; MetaCPAN )
elium');

Make a URL for the Wikidata page. You will then need to retrieve the
page and parse the JSON yourself. Use a second argument to specify the
language of the page:

    
    use utf8;
    use 
%B8%AE%E0%B8%B5%E0%B9%80%E0%B8%A5%E0%B8%B5%E0%B8%A2%E0%B8%A1&props=sitelinks/urls|datatype&format=json


(This example is included as L<F<thai-url.pl>|https://fastapi.metacpan.org/source/BKB/WWW-Wikip
ent

L<LWP::UserAgent> is used to retrieve the data from Wikidata.

=item JSON::Parse

L<JSON::Parse> is used to parse the JSON data from Wikidata.

=item URI::Escape

L<URI::Escape> is used to make t
AI-PredictionClient ( S/ST/STALL/AI-PredictionClient-0.05.tar.gz, STALL, 2017; MetaCPAN )
AI-PredictionClient/lib/AI/PredictionClient/CPP/PredictionGrpcCpp.pm ( view source; MetaCPAN )
m>
#include <memory>
#include <string>

#include <grpc++/grpc++.h>
#include <google/protobuf/util/json_util.h>

#include "tensorflow_serving/apis/prediction_service.grpc.pb.h"
#include "tds/base64.pb.
util::JsonPrintOptions jprint_options;
  google::protobuf::util::JsonParseOptions jparse_options;

  google::protobuf::util::Status request_serialized_status =
      google::protobuf::util::JsonString
ogle::protobuf::util::Status response_serialize_status =
        google::protobuf::util::MessageToJsonString(
            response, &serialized_result_object, jprint_options);

    if (!response_seria
AI-PredictionClient ( S/ST/STALL/AI-PredictionClient-0.05.tar.gz, STALL, 2017; MetaCPAN )
AI-PredictionClient/lib/AI/PredictionClient/Docs/Overview.pod ( view source; MetaCPAN )
ting/exporting the tensors in/out of a math package.   

The design takes advantage of the native JSON serialization capabilities built into the C++ Protocol Buffers. 
Serialization allows a much simp
AI-PredictionClient ( S/ST/STALL/AI-PredictionClient-0.05.tar.gz, STALL, 2017; MetaCPAN )
AI-PredictionClient/lib/AI/PredictionClient.pm ( view source; MetaCPAN )
ting/exporting the tensors in/out of a math package.   

The design takes advantage of the native JSON serialization capabilities built into the C++ Protocol Buffers. 
Serialization allows a much simp
WWW-Wikipedia-LangTitles ( B/BK/BKB/WWW-Wikipedia-LangTitles-0.04.tar.gz, BKB, 2017; MetaCPAN )
WWW-Wikipedia-LangTitles/lib/WWW/Wikipedia/LangTitles.pm ( view source; MetaCPAN )
K,
);
our $VERSION = '0.04';

use LWP::UserAgent;
use URI::Escape 'uri_escape_utf8';
use JSON::Parse 'parse_json';

sub make_wiki_url
{
    my ($name, $lang) = @_;
    if (! $lang) {
	# Defaults to En
w/api.php?action=wbgetentities&sites=$lang&titles=$safe_name&props=sitelinks/urls|datatype&format=json";
    return $url;
}

sub get_wiki_titles
{
    my ($name, %options) = @_;
    my $lang = $option
	print "$name data was retrieved successfully.\n";
    }
    my $json = $response->decoded_content ();
    my $data = parse_json ($json);
    my $array = $data->{entities};
    my %lang2title;
    for
Net-SolarWinds-REST ( A/AK/AKALINUX/Net-SolarWinds-REST-1.22.tar.gz, AKALINUX, 2017; MetaCPAN )
Net-SolarWinds-REST/lib/Net/SolarWinds/REST.pm ( view source; MetaCPAN )
:SSL;
use LWP::UserAgent;
use HTTP::Request;
use MIME::Base64 qw();
use Net::SolarWinds::Log;
use JSON qw();
use URI::Encode qw(uri_encode);
use POSIX qw(strftime);

our $VERSION="1.22";

use base qw(
:JSON

This is a JSON object with the following options endabled: JSON->new->allow_nonref->utf8

=cut

# Global JSON OBJECT
our $JSON=JSON->new->allow_nonref->utf8;

=item * my $json=$class->get_json;


Returns the class level JSON object.

=cut

sub get_json { return $JSON; }

=item * $Net::SolarWinds::REST::UA

This is a LWP::UserAgent used to talk to CPM servers

=cut

# Global UA object
our $UA
AI-PredictionClient ( S/ST/STALL/AI-PredictionClient-0.05.tar.gz, STALL, 2017; MetaCPAN )
AI-PredictionClient/lib/AI/PredictionClient/Roles/PredictionRole.pm ( view source; MetaCPAN )
dictionClient::CPP::PredictionGrpcCpp;
use AI::PredictionClient::Testing::PredictionLoopback;
use JSON ();
use Data::Dumper;
use MIME::Base64 qw( encode_base64 decode_base64 );
use Moo::Role;

has hos
 my $json = JSON->new;

  my $request_json = $json->encode($self->request_ds);
  printf("Debug - JSON Request: %s \n", Dumper(\$request_json))
    if $self->debug_verbose;

  return $request_json;
}

eturn = shift;

  printf("Debug - JSON Response: %s \n", Dumper(\$serialized_return))
    if $self->debug_verbose;

  my $json = JSON->new;

  my $returned_ds = $json->decode(
    ref($serialized_retu
HTML-FormHandler ( G/GS/GSHANK/HTML-FormHandler-0.40068.tar.gz, GSHANK, 2017; MetaCPAN )
HTML-FormHandler/lib/HTML/FormHandler/Render/RepeatableJs.pm ( view source; MetaCPAN )
t
$HTML::FormHandler::Render::RepeatableJs::VERSION = '0.40068';
use Moose::Role;

use JSON::MaybeXS ('encode_json');


sub render_repeatable_js {
    my $self = shift;
    return '' unless $self->has
_js->{$key}->{level};
    }
    my $index_str = encode_json( \%index );
    my $html_str = encode_json( \%html );
    my $level_str = encode_json( \%level );
    my $js = <<EOS;
<script>
\$(document).
WebService-Freshservice ( T/TE/TECHMAN/WebService-Freshservice-0.004.tar.gz, TECHMAN, 2017; MetaCPAN )
WebService-Freshservice/lib/WebService/Freshservice/User/CustomField.pm ( view source; MetaCPAN )
;
use Method::Signatures 20140224;
use List::MoreUtils qw(any);
use Carp qw( croak );
use JSON qw( encode_json );
use Moo;
use namespace::clean;

# ABSTRACT: Freshservice User Custom Field

our $VERSI
put_api( "itil/requesters/".$self->id.".json", $data);
  return 1;
}

# Internal method that returns a clean perl data structure
# for encode_json
method TO_JSON {
  return $self->value;
}

1;

__END_

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