::Accessor::Fast';
use LWP::UserAgent;
use JSON;
__PACKAGE__->mk_accessors(qw(type src root name value choice));
my $mimemap = { json => 'application/json', xml => 'text/xml' };
sub new
{
my $sel
>choice($self->$parser($res->content));
}
}
sub parse_json
{
my $self = shift;
my $content = shift;
my $json = new JSON;
my $ref = $json->decode($content);
my @choices = ();
$ref = $ref->{$
name="type">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="json" />
<xs:enumeration value="xml" />
</xs:restriction>
</xs:simpleType>
</xs:attribut