ializer::JSON;
BEGIN { @Data::Serializer::JSON::ISA = qw(Data::Serializer) }
use warnings;
use strict;
use JSON;
use vars qw($VERSION @ISA);
$VERSION = '0.04';
sub serialize {
return JSON->VERSION
jToJson($_[1]) : JSON->new->utf8->encode($_[1]);
}
sub deserialize {
#return JSON->VERSION < 2 ? JSON->new->jsonToObj($_[1]) : JSON->new->decode($_[1]);
$_[1] and return JSON->VERSION < 2 ? JSON->n
ew->jsonToObj($_[1]) : JSON->new->utf8->decode($_[1]);
}
1;
__END__
=head1 NAME
Data::Serializer::JSON - Creates bridge between Data::Serializer and JSON
=head1 SYNOPSIS
use Data::Serializer:
package Data::Serializer::JSON::Syck;
BEGIN { @Data::Serializer::JSON::Syck::ISA = qw(Data::Serializer) }
use warnings;
use strict;
use JSON::Syck;
use vars qw($VERSION @ISA);
$VERSION = '0.02';
su
return JSON::Syck::Load($_[1]);
}
1;
__END__
=head1 NAME
Data::Serializer::JSON::Syck - Creates bridge between Data::Serializer and JSON::Syck
=head1 SYNOPSIS
use Data::Serializer::JSON::Syck;
head1 COPYRIGHT
This program is free software; you can redistribute it
and/or modify it under the same terms as Perl itself.
=head1 SEE ALSO
perl(1), Data::Serializer(3), JSON::Syck(3).
=cut
r(3)>
=item L<Data::Dumper(3)>
=item L<Data::Taxi(3)>
=item L<FreezeThaw(3)>
=item L<JSON(3)>
=item L<JSON::Syck(3)>
=item L<PHP::Serialization(3)>
=item L<Storable(3)>
=item L<XML::Dumper(3)>
r(3)>
=item L<Data::Dumper(3)>
=item L<Data::Taxi(3)>
=item L<FreezeThaw(3)>
=item L<JSON(3)>
=item L<JSON::Syck(3)>
=item L<PHP::Serialization(3)>
=item L<Storable(3)>
=item L<XML::Dumper(3)>
r(3)>
=item L<Data::Dumper(3)>
=item L<Data::Taxi(3)>
=item L<FreezeThaw(3)>
=item L<JSON(3)>
=item L<JSON::Syck(3)>
=item L<PHP::Serialization(3)>
=item L<Storable(3)>
=item L<XML::Dumper(3)>