if $] < 5.010, 'UNIVERSAL::DOES';
{
package JSON::MultiValueOrdered;
our $AUTHORITY = 'cpan:TOBYINK';
our $VERSION = '0.006';
use base qw(JSON::Tiny::Subclassable);
use Tie::Hash::Multi
__END__
=head1 NAME
JSON::MultiValueOrdered - handle JSON like {"a":1, "a":2}
=head1 SYNOPSIS
use Test::More tests => 4;
use JSON::MultiValueOrdered;
my $j = JSON::MultiValueOrdered->
isa_ok $j, 'JSON::Tiny';
my $data = $j->decode(<<'JSON');
{
"a": 1,
"b": 2,
"a": 3,
"b": 4
}
JSON
# As you'd expect, for repeated values, the last val
.008;
use strict;
use warnings;
{
package JSON::Tiny::Subclassable;
our $AUTHORITY = 'cpan:TOBYINK';
our $VERSION = '0.006';
our @ISA = qw(JSON::Tiny);
use B;
use Encode ();
use Sca
mport('j');
# Literal names
my $FALSE = bless \(my $false = 0), 'JSON::Tiny::_Bool';
my $TRUE = bless \(my $true = 1), 'JSON::Tiny::_Bool';
# Escaped special character map (with u2028 and u2
= qr/[\x20\x09\x0a\x0d]*/;
sub DOES {
my ($proto, $role) = @_;
return 1 if $role eq 'Mojo::JSON';
return $proto->SUPER::DOES($role);
}
sub decode {
my ($self, $bytes) = @_;
# Clean
gs to
L<http://rt.cpan.org/Dist/Display.html?Queue=JSON-MultiValueOrdered>.
=head1 SEE ALSO
L<JSON::Tiny::Subclassable>,
L<JSON::Tiny>,
L<Mojo::JSON>.
=head1 AUTHOR
Toby Inkster E<lt>tobyink@cpan.