File Coverage

blib/lib/OpenSearch/Client/Serializer/JSON.pm
Criterion Covered Total %
statement 9 9 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod n/a
total 12 12 100.0


line stmt bran cond sub pod time code
1             # OpenSearch::Client is an unofficial client for OpenSearch.
2             # It is derived from Search::Elasticsearch version 7.714
3             # License details from the original work are contained in the
4             # NOTICE file distributed with this work.
5             #
6             #-----------------------------------------------------------------------
7             # OpenSearch::Client
8             #-----------------------------------------------------------------------
9             # Copyright 2026 Mark Dootson
10             #
11             # Licensed under the Apache License, Version 2.0 (the "License");
12             # you may not use this file except in compliance with the License.
13             # You may obtain a copy of the License at
14             #
15             # http://www.apache.org/licenses/LICENSE-2.0
16             #
17             # Unless required by applicable law or agreed to in writing, software
18             # distributed under the License is distributed on an "AS IS" BASIS,
19             # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20             # See the License for the specific language governing permissions and
21             # limitations under the License
22              
23             package OpenSearch::Client::Serializer::JSON;
24             $OpenSearch::Client::Serializer::JSON::VERSION = '3.007002';
25 46     46   25286 use Moo;
  46         76  
  46         338  
26 46     46   34730 use JSON::MaybeXS 1.002002 ();
  46         316265  
  46         2741  
27              
28             has 'JSON' => ( is => 'ro', default => sub { JSON::MaybeXS->new->utf8(1) } );
29              
30             with 'OpenSearch::Client::Role::Serializer::JSON';
31 46     46   325 use namespace::clean;
  46         121  
  46         398  
32              
33             1;
34              
35             __END__