package SWISH::Filters::JSON;
use strict;
use vars qw( $VERSION @ISA );
$VERSION = '0.191';
@ISA = ('SWISH::Filters::Base');
use Data::Dump qw( dump );
sub new {
my ($class) = @_;
my $sel
pplication/json!], }, $class;
return $self->use_modules( 'JSON', ['Search::Tools::XML' => '0.88'], );
}
sub filter {
my ( $self, $doc ) = @_;
# get the raw content
my $json = $doc->f
etch_doc_reference;
# convert to perl
my $perl = JSON::decode_json($$json);
# convert to XML
my $xml = Search::Tools::XML->perl_to_xml(
$perl,
{ root => 'doc'