| 1 | package Search::Elasticsearch::Serializer::JSON::Cpanel; | ||
| 2 | 3 | $Search::Elasticsearch::Serializer::JSON::Cpanel::VERSION = '6.80'; | |
| 3 | 3 | ▶ | use Cpanel::JSON::XS; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 3 | ▶ | use Moo; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | has 'JSON' => | ||
| 7 | 3 | ▶ | ( is => 'ro', default => sub { Cpanel::JSON::XS->new->utf8(1) } ); |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | 3 | with 'Search::Elasticsearch::Role::Serializer::JSON'; | |
| 10 | |||
| 11 | 3 | 1; | |
| 12 | |||
| 13 | =pod | ||
| 14 | |||
| 15 | =encoding UTF-8 | ||
| 16 | |||
| 17 | =head1 NAME | ||
| 18 | |||
| 19 | Search::Elasticsearch::Serializer::JSON::Cpanel - A JSON Serializer using Cpanel::JSON::XS | ||
| 20 | |||
| 21 | =head1 VERSION | ||
| 22 | |||
| 23 | version 6.80 | ||
| 24 | |||
| 25 | =head1 SYNOPSIS | ||
| 26 | |||
| 27 | $e = Search::Elasticsearch( | ||
| 28 | serializer => 'JSON::Cpanel' | ||
| 29 | ); | ||
| 30 | |||
| 31 | =head1 DESCRIPTION | ||
| 32 | |||
| 33 | While the default serializer, L<Search::Elasticsearch::Serializer::JSON>, | ||
| 34 | tries to choose the appropriate JSON backend, this module allows you to | ||
| 35 | choose the L<Cpanel::JSON::XS> backend specifically. | ||
| 36 | |||
| 37 | This class does L<Search::Elasticsearch::Role::Serializer::JSON>. | ||
| 38 | |||
| 39 | =head1 SEE ALSO | ||
| 40 | |||
| 41 | =over | ||
| 42 | |||
| 43 | =item * L<Search::Elasticsearch::Serializer::JSON> | ||
| 44 | |||
| 45 | =item * L<Search::Elasticsearch::Serializer::JSON::XS> | ||
| 46 | |||
| 47 | =item * L<Search::Elasticsearch::Serializer::JSON::PP> | ||
| 48 | |||
| 49 | =back | ||
| 50 | |||
| 51 | =head1 AUTHOR | ||
| 52 | |||
| 53 | Enrico Zimuel <enrico.zimuel@elastic.co> | ||
| 54 | |||
| 55 | =head1 COPYRIGHT AND LICENSE | ||
| 56 | |||
| 57 | This software is Copyright (c) 2020 by Elasticsearch BV. | ||
| 58 | |||
| 59 | This is free software, licensed under: | ||
| 60 | |||
| 61 | The Apache License, Version 2.0, January 2004 | ||
| 62 | |||
| 63 | =cut | ||
| 64 | |||
| 65 | __END__ | ||