Group
Extension

Matches 3

TBX-XCS ( B/BY/BYUTRG/TBX-XCS-0.05.tar.gz, BYUTRG, 2013; MetaCPAN )
TBX-XCS/lib/TBX/XCS/JSON.pm ( view source; MetaCPAN )
::JSON;
use strict;
use warnings;
use TBX::XCS;
use JSON;
use Carp;
#carp from calling package, not from here
our @CARP_NOT = qw(TBX::XCS::JSON);
use Exporter::Easy (
    OK => [qw(xcs_from_json json_
 in JSON


#default: read XCS file and dump JSON data to STDOUT
print json_from_xcs(TBX::XCS->new(file => $ARGV[0]))
    unless caller;


sub json_from_xcs {
    my ($xcs) = @_;
    return to_json($xc
s->{data}, {utf8 => 1, pretty => 1});
}


sub xcs_from_json {
    my ($json) = @_;
    my $struct  = decode_json $json;
    _check_structure($struct);
    my $xcs = {};
    $xcs->{data} = $struct;
   
TBX-XCS ( B/BY/BYUTRG/TBX-XCS-0.05.tar.gz, BYUTRG, 2013; MetaCPAN )
TBX-XCS/lib/TBX/XCS.pm ( view source; MetaCPAN )
e warnings;
use XML::Twig;
use feature 'say';
use JSON;
use Carp;
#carp from calling package, not from here
our @CARP_NOT = qw(TBX::XCS TBX::XCS::JSON);
use Data::Dumper;
our $VERSION = '0.05'; # VERS
TBX-XCS ( B/BY/BYUTRG/TBX-XCS-0.05.tar.gz, BYUTRG, 2013; MetaCPAN )
TBX-XCS/bin/xcs2json.pl ( view source; MetaCPAN )
is
# PODNAME: xcs2json.pl
our $VERSION = '0.05'; # VERSION
# ABSTRACT: Print a JSON representation of the input XCS file
use TBX::XCS;
use TBX::XCS::JSON qw(json_from_xcs);
print json_from_xcs(TBX::XC
S->new(file => $ARGV[0]));

__END__

=pod

=head1 NAME

xcs2json.pl - Print a JSON representation of the input XCS file

=head1 VERSION

version 0.05

=head1 AUTHOR

Nathan Glenn <garfieldnate@gmail.c

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.