rmat_json {
my (undef, $csv, @releases) = @_;
require JSON;
my $repo = $workflow->config('remote.origin.url');
my ($name) = $repo =~ m{[/:](.*?)(?:[.]git)?$}xms;
print JSON::en
code_json({
repository => $repo,
name => $name,
release => $releases[-1]{name},
release_date => '' . localtime($releases[-1]{time}),
branches
er)
-l --local Shorthand for --branch '^master$'
-f --format[=](test|text|html|csv|tab|json)
Set the out put format
* test - TAP test formatted out
e English qw/ -no_match_vars /;
use Pod::Usage;
use Term::ANSIColor qw/colored/;
use JSON qw/decode_json encode_json/;
use App::Git::Workflow;
use App::Git::Workflow::Command qw/get_options/;
our $VE
ub set_memos {
my ( $self, $json ) = @_;
my $git_dir = $workflow->git->rev_parse("--show-toplevel");
chomp $git_dir;
my $memo = "$git_dir/.git/memo.json";
open my $fh, '>', $memo
} encode_json($json), "\n";
}
sub get_memos {
my ($self) = @_;
my $git_dir = $workflow->git->rev_parse("--show-toplevel");
chomp $git_dir;
my $memo = "$git_dir/.git/memo.json";
i
nt "Total commits = $total\n";
return;
}
sub fmt_json {
my ($self, $users, $total) = @_;
require JSON;
print JSON::encode_json({ total => $total, users => $users });
}
sub fmt_perl
h --format json)
-s --since[=]YYYY-MM-DD
Only commits since this date
-u --until[=]YYYY-MM-DD
Only commits up until this date
-f --format[=](table|json|csv)
- table : shows the data in a simple table
- json : returns the raw data as a json object
- perl : Dump the data structure
-p --period=[day|w
);
# or
my $parser = xDT::Parser->new(
record_type_config => JSON::Parser::read_json($json_file)
);
# A record type configuration can be provided via xml file or a
this driver
=head1 METHODS
=cut
use base 'SMS::Send::Driver';
use LWP::UserAgent();
use JSON qw(encode_json);
use Scalar::Util qw( looks_like_number );
=head2 new
# Instantiate a sender objec
rams{text};
# Add our authorisation credentials
# Send the request
my $body = encode_json({
user => $self->{'user'},
pass => $self->{'pass'},
source
my $response = $ua->post(
$self->{'base_url'},
'Content-Type' => 'application/json',
Content => $body
);
# Check the send succeded
if (!$response->is_su
se modules let you use JSONPath syntax to select nodes of a data structure:
L<JSON::Path>. JSONPath is a query language to select nodes of a JSON document
(data structure). JSONPath specification:
L<h
cles/JsonPath>.
=head2 Related modules
L<Data::CSel::WrapStruct>
L<CSel::Examples>
=head2 Modules that use CSel
=over
=item * For data structure
CLI to select JSON nodes using CSel: L<jsonsel>
(from L<App::jsonsel>).
CLI to select Perl data structure elements using CSel: L<ddsel> (from
L<App::CSelUtils>).
CLI to select YAML nodes using CSel: L<yamlsel> (from L<App::yamlsel>).
=item * For
<Catalyst> error page is in HTML and if your client is requesting
JSON we'll return a properly formatted response in C<application/json>.
B<NOTE> if you are in CATALYST_DEBUG mode then all HTTP 500 e
TP errors using
proper content negotiation. Out of the box it support returning errors in HTML,
JSON and Text, with errors in a number of common languages. Patches to support more
languages and me
rs>, L<Catalyst::View::Errors::HTML>,
L<Catalyst::View::Errors::Text>, L<Catalyst::View::Errors::JSON>,
L<Catalyst::ActionRole::RenderErrors>.
=head1 AUTHOR
John Napiorkowski L<email:jjnapior
changelog against the JSON Schema used by changelord.
END
use Path::Tiny;
use JSON;
use YAML::XS;
use JSON::Schema::Modern;
with 'App::Changelord::Role::Changelog';
option json => (
is => 'ro',
output schema as json',
);
sub run($self) {
local $YAML::XS::Boolean = 'boolean';
my $schema = path(__FILE__)->sibling('changelog-schema.yml')->slurp;
my $result = JSON::Schema::Modern-
qw($RealBin);
use File::Copy;
use File::HomeDir;
use File::Share qw(:all);
use HTTP::Request;
use JSON;
use MIME::Base64 qw(encode_base64url);
use WWW::Mechanize;
use URI;
use UUID;
our $VERSION = '1
=> "$home_dir/tesla_auth_cache.json",
ENDPOINTS_FILE => $ENV{TESLA_API_ENDPOINTS_FILE} // dist_file('Tesla-API', 'endpoints.json'),
OPTION_CODES_FILE => $ENV
{TESLA_API_OPTIONCODES_FILE} // dist_file('Tesla-API', 'option_codes.json'),
TOKEN_EXPIRY_WINDOW => 5,
URL_API => 'https://owner-api.teslamotors.com/',
URL_ENDP
my $post_request = HTTP::Request->new(POST => $uri);
$post_request->content_type('application/json');
$post_request->content($post_values);
my $http_response = $user_agent->request($post_
ypes of its changes.
Also set the release date of that release to today.
END
use Path::Tiny;
use JSON;
use YAML qw/ Bless /;
use List::AllUtils qw/ first min uniq /;
use Version::Dotted::Se
his program. If not, see <https://www.gnu.org/licenses/>.
package Groonga::Commands::Load;
use JSON;
use Carp 'croak';
use strict;
use warnings;
use Data::Dumper;
my $groonga_http_client = undef;
$parsed_arguments{'table'} = $args->{'table'};
}
$parsed_arguments{'values'} = encode_json($args->{'values'});
return \%parsed_arguments;
}
sub _parse_result {
my $result = shift
ge Groonga::Commands::Delete;
use Carp 'croak';
use strict;
use warnings;
use Data::Dumper;
use JSON;
my $groonga_http_client = undef;
my $command_args = "";
my @delete_arguments = (
'table',
ents;
}
sub _parse_result {
my $result = shift;
my %result_set = ();
if ($result == JSON::PP::true) {
$result = 1;
} else {
$result = 0;
}
$result_set{'is_suc
6.0;
use Moo;
use CLI::Osprey
desc => 'output the latest/next version';
use Path::Tiny;
use JSON;
use YAML::XS;
use List::AllUtils qw/ first min /;
use Version::Dotted::Semantic;
with 'App::Cha
ict;
use parent 'Tesla::API';
use Carp qw(croak confess);
use Data::Dumper;
use HTTP::Tiny;
use JSON;
our $VERSION = '0.08';
use constant {
DEBUG_ONLINE => $ENV{TESLA_DEBUG_ONLINE},
DEB
lf->longitude;
my $geo_data = {
lat => $lat,
lon => $lon,
format => 'json',
};
my $uri_params = $self->_address_web_client()->www_form_urlencode($geo_data);
m
if ($geocode_response->{success}) {
my $json_geocode_data = $geocode_response->{content};
my $geocode_data = decode_json($json_geocode_data);
my $address_data = $geocode_
= (
'text/html' => 'Errors::HTML',
'text/plain' => 'Errors::Text',
'application/json' => 'Errors::JSON',
);
my %views = %DEFAULT_ERROR_VIEWS;
my @accepted = ();
my $default_media_type = 'tex
' => 'Errors::HTML',
'text/plain' => 'Errors::Text',
'application/json' => 'Errors::JSON',
},
},
);
__PACKAGE__->setup();
__PACKAGE__->meta->make_immu
table();
By default we map the media types C<text/html>, C<text/plain> and C<application/json> to
cooresponding views. This views are injected automatically if you don't provide subclasses
or your o
ith this program. If not, see <https://www.gnu.org/licenses/>.
package Groonga::ResultSet;
use JSON::PP;
use strict;
use warnings;
my $command_response_code = undef;
my @command_response_raw = ()
my $self = {%args};
if ($self->{decoded_content}) {
@command_response_raw = decode_json($self->{decoded_content});
$command_response_code = $command_response_raw[0][0][0];
0;
use Moo;
use CLI::Osprey desc => 'initialize new changelog source file';
use Path::Tiny;
use JSON;
use YAML qw/ Bless /;
use List::AllUtils qw/ first min uniq /;
use Version::Dotted::Se
;
use 5.36.0;
use Moo;
use CLI::Osprey
doc => 'print JSON schema for the changelog format',
description_pod => <<'END';
Print the JSON schema describing the data format used by changelord.
B
an also be printed as JSON
via the C<--json> option.
END
use Path::Tiny;
use JSON;
use YAML;
option json => (
is => 'ro',
default => 0,
doc => 'output schema as json',
);
sub run($self)
schema = YAML::Load(path(__FILE__)->sibling('changelog-schema.yml')->slurp);
print $self->json ? JSON->new->pretty->encode(YAML::Load($schema)) : YAML::Dump($schema);
}
'end of App::Changelog::C