_JSON;
use 5.008002;
use strict;
use warnings;
use Carp;
our $VERSION = '0.05';
our (@ISA, @EXPORT_OK);
BEGIN {
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw( marc2marc_in_json
marc_in_json2marc each_record );
}
use MARC::Record;
use JSON; # decode_json()
#---------------------------------------------------------------------
sub marc2marc_in_json {
my( $marc_record )
= @_;
my %marc_in_json;
for my $leader ( $marc_record->leader() ) {
$marc_in_json{'leader'} = $leader;
}
for my $field ( $marc_record->fields() ) {
my $ftag = $fie