ll changelog. The default is to render the changelog
in markdow, but the option C<--json> can be used to have a JSON
version instead.
To generate the changelog without the NEXT release, uses the
C<--
::ChangeTypes';
with 'App::Changelord::Role::Render';
option json => (
is => 'ro',
default => 0,
doc => 'output schema as json',
);
option next => (
is => 'ro',
default => 1,
@values = grep $_->is_resource, $self->rdf_get(@_);
wantarray ? @values : $values[0];
}
sub TO_JSON
{
my $self = shift;
$self->fixes if $self->can('fixes');
my $hash = +{ %$self };
delete $hash
, $self->meta->calculate_all_roles_with_inheritance ];
return $hash;
}
sub dump_json
{
require JSON;
JSON::to_json(
shift(),
{ pretty => 1, canonical => 1, convert_blessed => 1 },
);
}
sub i
ooX::Options
protect_argv => 0,
usage_string => '%c %o [output-filename]';
use Carp;
use JSON::MaybeXS ();
use Module::Load qw/ load /;
use Package::Stash;
use Ref::Util qw/ is_scalarref /;
u
leStr /;
use Types::Standard qw/ ArrayRef Bool HashRef InstanceOf /;
# RECOMMEND PREREQ: Cpanel::JSON::XS
# RECOMMEND PREREQ: Package::Stash::XS
# RECOMMEND PREREQ: Ref::Util::XS
# RECOMMEND PREREQ:
=> Bool,
default => 0,
short => 'p',
doc => 'enable pretty printed JSON',
);
has stash => (
is => 'lazy',
isa => InstanceOf ['Package::Stash'],
bu
;
# ABSTRACT: A REST API client for ValidSign
use Carp qw(croak);
use HTTP::Request;
use JSON qw(decode_json);
use URI;
use Types::Standard qw(Str);
use WebService::ValidSign::Types qw(
WebServi
lso compatible for POSTed data
(such as JSON POSTed data) although in the case of body data such as JSON we merely whitelist the fields
and structure since JSON can already support nested data structu
body>.
=head2 structured_data
The same as L</structured_body> except aimed at body data such as JSON post. Basically works
the same except the default for handling array values is to leave them al
package RT::Extension::REST2::Util;
use strict;
use warnings;
use JSON ();
use Scalar::Util qw( blessed );
use List::MoreUtils 'uniq';
use Sub::Exporter -setup => {
exports => [qw[
looks
xpand_uid
expand_uri
serialize_record
deserialize_record
error_as_json
record_type
record_class
escape_uri
query_string
custom_f
->debug("Received unknown value via JSON for field $field: ".ref($value));
delete $data->{$field};
}
}
return $data;
}
sub error_as_json {
my $response = shift;
my
CurrentUser->new;
}
# Used in Serialize to allow additional fields to be selected ala JSON API on:
# http://jsonapi.org/examples/
sub expand_field {
my $self = shift;
my $item = shift;
ta->{azuread}{login_info} = $self->_stringify_json_booleans(
JSON::MaybeXS::decode_json( $dec )
);
};
if($@) {
# JSON parse error
}
}
}
if ($self->
oken},
Accept => "application/json"
);
if ( $resp->is_success ) {
my $user = $self->_stringify_json_booleans(
JSON::MaybeXS::decode_json( $resp->decoded_content )
);
Extension::REST2::Resource::Collection';
with 'RT::Extension::REST2::Resource::Role::RequestBodyIsJSON' =>
{type => 'ARRAY'};
has 'group' => (
is => 'ro',
);
sub dispatch_rules {
Path::Di
, 'HEAD', 'DELETE', 'PUT');
return \@ok;
}
sub content_types_accepted {[{'application/json' => 'from_json'}]}
sub delete_resource {
my $self = shift;
my $collection = $self->collection;
eteMember($group_member->MemberId);
}
return 1;
}
sub from_json {
my $self = shift;
my $params = JSON::decode_json($self->request->content);
my $group = $self->group;
my $m
GET => $uri,
[
'Content-Type' => 'application/json',
Accept => 'application/json',
]
);
return $self->call_api($request);
}
sub create_
lf->get_endpoint($self->action_endpoint);
my $json = $self->json->encode($package);
my $request = $self->_add_documents($package, $uri, $json);
my $response = $self->call_api($request);
ponse->{id});
return $response->{id};
}
sub _add_documents {
my ($self, $package, $uri, $json) = @_;
my @files;
if (!$package->has_documents) {
croak("Unable to add document
application_key: your_application_key
method: 'users.getCurrentUser'
format: 'json'
fields: 'email,name,gender,birthday,location,uid,pic_full'
MailRU:
t
format: 'json'
secure: 1
Yandex:
tokens:
client_id: your_client_id
client_secret: your_client_secret
format: 'json'
SalesF
GET => $uri,
[
'Content-Type' => 'application/json',
Accept => 'application/json',
]
);
return $self->call_api($request);
}
sub senders
GET => $uri,
[
'Content-Type' => 'application/json',
Accept => 'application/json',
]
);
my $response = $self->call_api($request);
my
tials.json',
);
$request->sign;
my $resp = $self->ua->request(GET $request->to_url);
if ($resp->is_success) {
my $user = $self->_stringify_json_booleans(
JSON::May
beXS::decode_json( $resp->decoded_content )
);
$session_data->{twitter}{user_info} = $user;
$session->write('oauth', $session_data);
}
}
1;
JavaScript::Embedded::Bool' => 1,
'boolean' => 1,
'JSON::PP::Boolean' => 1,
'JSON::Tiny::_Bool' => 1,
'Data::MessagePack::Boolean' => 1
};
BEGIN
'JavaScript::Embedded::Bool';
}
sub true { $true }
sub false { $false }
sub TO_JSON { ${$_[0]} ? \1 : \0 }
}
package JavaScript::Embedded::NULL;
{
use warnings;
use strict;
= $resp->content) =~ s/(^\[|\]$)//g;
my $user = $self->_stringify_json_booleans(
JSON::MaybeXS::decode_json( $res )
);
$session_data->{mailru}{user_info} = $user;
);
if( $resp->is_success ) {
my $user = $self->_stringify_json_booleans(
JSON::MaybeXS::decode_json( $resp->content )
);
$session_data->{vkontakte}{user_inf
);
if( $resp->is_success ) {
my $user = $self->_stringify_json_booleans(
JSON::MaybeXS::decode_json( $resp->decoded_content )
);
$session_data->{stackexchan
_USE_JSON_BUILTIN
#define DUK_USE_JSON_DECNUMBER_FASTPATH
#define DUK_USE_JSON_DECSTRING_FASTPATH
#define DUK_USE_JSON_DEC_RECLIMIT 1000
#define DUK_USE_JSON_EATWHITE_FASTPATH
#define DUK_USE_JSON_ENC
_RECLIMIT 1000
#define DUK_USE_JSON_QUOTESTRING_FASTPATH
#undef DUK_USE_JSON_STRINGIFY_FASTPATH
#define DUK_USE_JSON_SUPPORT
#define DUK_USE_JX
#define DUK_USE_LEXER_SLIDING_WINDOW
#undef DUK_USE_LIGH
define DUK_USE_NONSTD_FUNC_STMT
#define DUK_USE_NONSTD_GETTER_KEY_ARGUMENT
#define DUK_USE_NONSTD_JSON_ESC_U2028_U2029
#define DUK_USE_NONSTD_SETTER_KEY_ARGUMENT
#define DUK_USE_NONSTD_STRING_FROMCHAR
strict;
use warnings;
use DateTime;
use Digest::MD5 qw(md5_hex);
use HTTP::Request::Common;
use JSON::MaybeXS;
use LWP::UserAgent;
use Net::OAuth;
use Scalar::Util qw( blessed );
use URI::Query;
use
ssed($_[0]))[-1];
}
sub _stringify_json_booleans {
my ($self, $obj) = @_;
while( my ($k, $v) = each %{$obj} ) {
$obj->{$k} = $self->_stringify_json_booleans( $v )
if( ref
my $params = {};
if( $content_type =~ m/json/ || $content_type =~ m/javascript/ ) {
$params = decode_json( $response->content );
} else {
Yandex;
use strict;
use parent 'Dancer2::Plugin::Auth::OAuth::Provider';
use HTTP::Request;
use JSON::MaybeXS;
use LWP::UserAgent;
sub config { {
version => 2,
urls => {
authorize_u
req);
if( $resp->is_success ) {
my $user = $self->_stringify_json_booleans(
JSON::MaybeXS::decode_json( $resp->content )
);
$session_data->{yandex}{user_info}