| 1 | package Net::Async::Graphite::JSONCodec; | ||
| 2 | |||
| 3 | our $VERSION = '0.0_1'; | ||
| 4 | |||
| 5 | use v5.14; | ||
| 6 | use strictures 2; | ||
| 7 | use Moo::Role; | ||
| 8 | use Carp; | ||
| 9 | |||
| 10 | use JSON (); | ||
| 11 | use namespace::clean; | ||
| 12 | |||
| 13 | =item _json (read-only) | ||
| 14 | |||
| 15 | A L<JSON> codec object. | ||
| 16 | |||
| 17 | =cut | ||
| 18 | |||
| 19 | has _json => is => lazy => init_arg => undef, builder => sub { | ||
| 20 | JSON->new->utf8->allow_blessed(1) | ||
| 21 | }; | ||
| 22 | |||
| 23 | 1; |