ateColumn::JSON2Object;
# ABSTRACT: convert JSON columns to Perl objects
our $VERSION = '0.907'; # VERSION
use strict;
use warnings;
use 5.014;
use JSON::MaybeXS qw(encode_json decode_json );
use En
utf8::encode($raw_list) if utf8::is_utf8($raw_list);
my $list = decode_json($raw_list);
die('Can only work with arrayref')
unless
if !defined $data
|| $data =~ m/^\s*$/;
return decode_json( encode_utf8($data) );
},
deflate => sub {
my
package DBIx::Class::InflateColumn::JSON2Object::Role::Storable;
# ABSTRACT: simplified MooseX::Storage clone with enhanced JSON boolean handling
our $VERSION = '0.907'; # VERSION
use 5.014;
use Mo
ass::InflateColumn::JSON2Object::Trait::NoSerialize;
use JSON::MaybeXS;
use String::CamelCase qw(camelize decamelize);
use Moose::Util::TypeConstraints;
subtype 'InflateColumnJSONBool', as 'Ref';
co
via { $_ ? JSON->true : JSON->false };
coerce 'InflateColumnJSONBool',
from 'Int',
via { $_ ? JSON->true : JSON->false };
coerce 'InflateColumnJSONBool', from 'Undef', via { JSON->false };
package DBIx::Class::InflateColumn::JSON2Object::Trait::NoSerialize;
# ABSTRACT: NoSerialize trait for attributes
our $VERSION = '0.907'; # VERSION
use Moose::Role;
use 5.014;
package Moose::Meta::
'DBIx::Class::InflateColumn::JSON2Object::Trait::NoSerialize';
}
}
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
DBIx::Class::InflateColumn::JSON2Object::Trait::NoSerialize - NoSerial
ize trait for attributes
=head1 VERSION
version 0.907
=head1 NAME
DBIx::Class::InflateColumn::JSON2Object::Trait::NoSerialize - NoSerialize trait for attributes
=head1 VERSION
version 0.900
=he