Group
Extension

Matches 35358

Apache-Solr ( M/MA/MARKOV/Apache-Solr-1.11.tar.gz, MARKOV, 2025; MetaCPAN )
Apache-Solr/lib/Apache/Solr/JSON.pod ( view source; MetaCPAN )
1 NAME

Apache::Solr::JSON - Apache Solr (Lucene) client via JSON

=head1 INHERITANCE

 Apache::Solr::JSON
   is an Apache::Solr

=head1 SYNOPSIS

  my $solr = Apache::Solr::JSON->new(...);
  my $solr
(format => 'JSON', ...);

=head1 DESCRIPTION

Implement the Solr client, where the communication is in JSON.

Both the requests and the responses are using JSON syntax, produced by
the JSON distributi
on (which defaults to JSON::XS when installed)

B<Warning 1:>
Apparently, Perl's JSON implementation does not support the repetition
of keys in one list, but Solr is using that.  Care is taken to avoi
Apache-Solr ( M/MA/MARKOV/Apache-Solr-1.11.tar.gz, MARKOV, 2025; MetaCPAN )
Apache-Solr/lib/Apache/Solr.pm ( view source; MetaCPAN )
 eq __PACKAGE__)
	{	my $format = delete $args{format} || 'XML';
		$format eq 'XML' || $format eq 'JSON'
			or panic "unknown communication format '$format' for solr";
		$class .= '::' . $format;
		eva
;
	}
	@which or return;

	# JSON calls do not accept multiple ids at once (it seems in 4.0)
	my $result;
	if($self->serverVersion ge '1.4' && !$self->isa('Apache::Solr::JSON'))
	{	$result = $self->_de
Map-Tube ( M/MA/MANWAR/Map-Tube-4.10.tar.gz, MANWAR, 2025; MetaCPAN )
Map-Tube/lib/Map/Tube/Utils.pm ( view source; MetaCPAN )
1 VERSION

Version 4.10

=cut

use utf8;
use v5.14;
use strict;
use warnings;

use Try::Tiny;
use JSON::MaybeXS;
use Scalar::Util ();
use File::ShareDir ':ALL';
use Unicode::Normalize 'NFC';

use pare
e) = @_;

    my $json_text = do {
        open(my $json_fh, "<", $file) or die("ERROR: Can't open $file: $!\n");
        local $/;
        my $text = <$json_fh>;
        close($json_fh);
        $tex
t;
    };

    try {
        return JSON::MaybeXS->new->allow_nonref->utf8(1)->decode($json_text);
    }
    catch {
        die $@;
    };
}

sub trim {
    my ($data) = @_;

    return unless define
Apache-Solr ( M/MA/MARKOV/Apache-Solr-1.11.tar.gz, MARKOV, 2025; MetaCPAN )
Apache-Solr/lib/Apache/Solr.pod ( view source; MetaCPAN )
Apache Solr (Lucene) extension

=head1 INHERITANCE

 Apache::Solr is extended by
   Apache::Solr::JSON
   Apache::Solr::XML

=head1 SYNOPSIS

  # use Log::Report mode => "DEBUG";
  my $solr    = Apach
m format => 'XML'|'JSON'

Communication format between client and server.  You may also instantiate
L<Apache::Solr::XML|Apache::Solr::XML> or L<Apache::Solr::JSON|Apache::Solr::JSON> directly.

=item 
 * flexible logging framework (Log::Report)

=item * both-way XML or both-way JSON, not requests in XML and answers in JSON

=item * access to plugings like terms and tika

=item * no Moose

=back

=h
Term-CLI ( S/SB/SBAKKER/Term-CLI-0.061000.tar.gz, SBAKKER, 2025; MetaCPAN )
Term-CLI/lib/Term/CLI/Tutorial.pod ( view source; MetaCPAN )
 BSSH]
    bssh> ls
    blib      lib           MANIFEST     t
    Copying   Makefile      MYMETA.json  Term-CLI-0.01.tar.gz
    cover_db  Makefile.old  MYMETA.yml   TODO
    examples  Makefile.PL   p
Rope ( L/LN/LNATION/Rope-0.44.tar.gz, LNATION, 2025; MetaCPAN )
Rope/lib/Rope/Conditional.pm ( view source; MetaCPAN )

						"three" => 789
					}
				}
			},
			"four" => 123
		}
	);

	conditional json_data => ['JSON', 'path/to/file.json'];
	conditional yaml_data => ['YAML', 'path/to/file.yaml'];

	...

	1;

...

	m
Lab-Measurement ( A/AK/AKHUETTEL/Lab-Measurement-3.931.tar.gz, AKHUETTEL, 2025; MetaCPAN )
Lab-Measurement/lib/Lab/Moose/Instrument/AttoCube_AMC.pm ( view source; MetaCPAN )
r validated_setter/;
#use Lab::Moose::Instrument::Cache;
use Carp;
use namespace::autoclean;

use JSON::PP;
use Tie::IxHash;
 
# (1)
extends 'Lab::Moose::Instrument';

has 'request_id' => (
	is => 'rw
'language' => (
	is => 'ro',
	isa => 'Int',
	default => 0
);

has 'json' => (
	is => 'ro',
	isa => 'JSON::PP',
	default => sub { JSON::PP->new },
);

has 'response_qeue' => (
  is => 'rw',
  isa => 'H
er
  print("This is method: $method, and this param: $params\n");

  # Create the JSON-RPC request TODO: change to JSON::RPC2 if it complies?
  # my $request = {
  #   id      => $self->request_id(), 
Cache-File-Simple ( B/BA/BAKERSCOT/Cache-File-Simple-0.1.tar.gz, BAKERSCOT, 2025; MetaCPAN )
Cache-File-Simple/lib/Cache/File/Simple.pm ( view source; MetaCPAN )
mple;

use Exporter 'import';
our @EXPORT = qw(cache);

use strict;
use warnings;
use v5.16;

use JSON::PP;
use Tie::File;
use File::Path;
use Digest::SHA qw(sha256_hex);
use File::Basename;

our $CAC
$key || "");
	my $dir  = "$CACHE_ROOT/perl-cache/" . substr($hash, 0, 3);
	my $file = "$dir/$hash.json";
	mkpath($dir);

	tie @data, 'Tie::File', $file or die("Unable to write $file"); # to r/w file

XPIRE;
		$data[0]    = encode_json({ expires => $expires, data => $val, key => $key });
		$ret        = 1;
	} elsif ($key && -r $file) { # Get
		eval { $ret = decode_json($data[0]); };
		if ($ret->{ex
Plack-Middleware-Security-Simple ( R/RR/RRWO/Plack-Middleware-Security-Simple-v0.13.0.tar.gz, RRWO, 2025; MetaCPAN )
Plack-Middleware-Security-Simple/lib/Plack/Middleware/Security/Common.pm ( view source; MetaCPAN )

    my $re =
qr{/(?:Dockerfile|alienfile|composer\.json|config(?:uration)?|cpanfile|deployment-config|live_env|local\.(?:json|xml)|package\.(?:json|xml)|robomongo|sendgrid|settings|storage|twilio)};
Crop-Config ( O/OC/OCTAVIANI/Crop-Config-0.1.25.tar.gz, OCTAVIANI, 2025; MetaCPAN )
Crop-Config/lib/Crop/Object.pm ( view source; MetaCPAN )
ved to Warehouse.

Returns:
	false
=cut
sub Table {  }

=begin nd
Method: TO_JSON ($data)
	Prepare blessed objects for JSON output.

	All the objects are a blessed hashrefs, so will return UNblessed o
ly by JSON module for each object.

Parameters:
	$data - blessed hashref

Returns:
	unblessed hashref
=cut
sub TO_JSON {
	my $data = shift;

	my $json =  {%$data};
	delete $json->{STATE};

	$json;
}

Crop-Config ( O/OC/OCTAVIANI/Crop-Config-0.1.25.tar.gz, OCTAVIANI, 2025; MetaCPAN )
Crop-Config/lib/Crop/Server.pm ( view source; MetaCPAN )
'experimental';

use Encode qw/ decode /;
use XML::LibXSLT;
use XML::LibXML;
use XML::Simple;
use JSON;
use CGI::Cookie;

use FindBin qw/ $RealBin /;

use Crop::Debug;
use Crop::Error qw/ all_right wa
orking directory
	data      - persistent data across all the handlers of an client request
	json      - JSON exemplar
	handler   - hash of registered handlers
	headers   - HTTP headers for response
	i
shref of all the errors ocquired (see <Crop::Error>)
	output_t  - type of output ('XML', 'XSLT', 'JSON', and so on)
	page      - filename of output template in cwd
	redirect  - URL to redirect
	reques
Map-Tube ( M/MA/MANWAR/Map-Tube-4.10.tar.gz, MANWAR, 2025; MetaCPAN )
Map-Tube/lib/Test/Map/Tube.pm ( view source; MetaCPAN )
 data (XML or JSON) and store it
  # surreptitiously in the Map::Tube object for later use.
  my $map = shift;
  return _prepare_xml_map($map ) if $map->can('xml');
  return _prepare_json_map($map) if
n_served_by_lines,
                     };
  return $map;
}


sub _prepare_json_map {
  # analyse the original map data (JSON format) and store them
  # surreptitiously in the Map::Tube object for lat
ion_served_by_lines,
      %station_line_count,
    );

  my $json = Map::Tube::Utils::to_perl( $map->json( ) );

  for my $line ( @{ $json->{lines}{line} } ) {
    my $id_case = $line->{id};
    my $
Test-YAFT ( B/BA/BARNEY/Test-YAFT-1.0.2.tar.gz, BARNEY, 2025; MetaCPAN )
Test-YAFT/lib/Test/YAFT/Test/Exception.pod ( view source; MetaCPAN )
:By::Zero::)
			& expect_methods (http_status  => HTTP::Status::BAD_REQUEST)
			& expect_methods (json_content => +{ error => ignore })
		;

=head1 AUTHOR

Branislav ZahradnĂ­k <barney@cpan.org>

=hea
SlapbirdAPM-Agent-Dancer2 ( R/RA/RAWLEYFOW/SlapbirdAPM-Agent-Dancer2-0.012.tar.gz, RAWLEYFOW, 2025; MetaCPAN )
SlapbirdAPM-Agent-Dancer2/lib/Dancer2/Plugin/SlapbirdAPM.pm ( view source; MetaCPAN )

use SlapbirdAPM::Dancer2::Trace ();
use Time::HiRes                 qw(time);
use Try::Tiny;
use JSON::MaybeXS ();
use Dancer2::Plugin;
use LWP::UserAgent;
use System::Info;
use SlapbirdAPM::Dancer2:

            'Content-Type'   => 'application/json',
            'x-slapbird-apm' => $self->key,
            Content          => JSON::MaybeXS::encode_json( \%response )
        );

        if ( !$sla
Map-Tube ( M/MA/MANWAR/Map-Tube-4.10.tar.gz, MANWAR, 2025; MetaCPAN )
Map-Tube/lib/Map/Tube/Cookbook.pm ( view source; MetaCPAN )
Tube> library.

=head1 CREATE A MAP

C<Map::Tube v3.22> or above now supports map data in XML and JSON format. Here is
the structure of a map in XML format:

    <?xml version="1.0" encoding="UTF-8"?>
         .....
           .....
           .....
        </stations>
    </tube>

And the same in JSON format:

   {
       "name"  : "Your-Map-Name",
       "lines" : {
           "line" : [
        
 line="L1:8" link="L07"             />
        </stations>
    </tube>

Next is the JSON representation C<sample.json> of the above map:

   {
       "name"     : "Sample",
       "lines"    : { "line
Test-YAFT ( B/BA/BARNEY/Test-YAFT-1.0.2.tar.gz, BARNEY, 2025; MetaCPAN )
Test-YAFT/lib/Test/YAFT/Introduction.pod ( view source; MetaCPAN )
 => 'north-america'
			=> expect         =>
				& expect_http_success
				& expect_json_content_type
				& expect_json_content {
					countries => [
						'Canada',
						'Mexico',
						'USA',
					]
nent => 'australia'
			=> expect         =>
				& expect_http_success
				& expect_json_content_type
				& expect_json_content {
					countries => [
						'Australia',
					]
				}
			;

		it "should 
ent => 'antarctica'
			=> expect         =>
				& expect_http_success
				& expect_json_content_type
				& expect_json_content {
					countries => [
					]
				}
			;
	};

=head2 Arrange {} block

C<a
SlapbirdAPM-Agent-Plack ( R/RA/RAWLEYFOW/SlapbirdAPM-Agent-Plack-0.011.tar.gz, RAWLEYFOW, 2025; MetaCPAN )
SlapbirdAPM-Agent-Plack/lib/Plack/Middleware/SlapbirdAPM.pm ( view source; MetaCPAN )
 );
use Time::HiRes;
use Try::Tiny;
use Plack::Request;
use Plack::Response;
use Const::Fast;
use JSON::MaybeXS;
use LWP::UserAgent;
use Carp ();
use System::Info;
use Time::HiRes qw(time);
use Slapbi
PM_URI,
            'Content-Type'   => 'application/json',
            'x-slapbird-apm' => $self->key,
            Content          => encode_json( \%response )
        );

        if ( !$slapbird_re
Test-Class-Moose ( E/EX/EXODIST/Test-Class-Moose-1.00.tar.gz, EXODIST, 2025; MetaCPAN )
Test-Class-Moose/lib/Test/Class/Moose/Role/CLI.pm ( view source; MetaCPAN )
$VERSION = '1.00';

use Moose::Role 2.0000;
use Carp;

use File::Find qw( find );
use JSON::MaybeXS qw( encode_json );
use Module::Runtime qw( use_package_optimistically );
use Module::Util qw( fs_pat
data_file;
    open my $fh, '>', $file or die "Cannot write to $file: $!";
    print {$fh} encode_json(
        {   process_name => $0,
            start_time   => $self->_start_time,
            timi
Test-Class-Moose ( E/EX/EXODIST/Test-Class-Moose-1.00.tar.gz, EXODIST, 2025; MetaCPAN )
Test-Class-Moose/lib/Test/Class/Moose/CLI.pm ( view source; MetaCPAN )
 by C<<
Test::Class::Moose::Report->timing_data >> plus some other information will be
encoded as JSON and stored in this file. The exact data stored looks like:

    {
         process_name => $0,
  
Geoffrey-Converter-Pg ( M/MZ/MZIESCHA/Geoffrey-Converter-Pg-0.000204.tar.gz, MZIESCHA, 2025; MetaCPAN )
Geoffrey-Converter-Pg/lib/Geoffrey/Converter/Pg.pm ( view source; MetaCPAN )

        integer          => 'integer',
        interval         => 'interval',
        json             => 'json',
        line             => 'line',
        lseg             => 'lseg',
        maca

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