Closed nichtich closed 3 years ago
Implemented in version 1.27 (possibly breaking change). Will adjust Catmandu::PICA accordingly.
This broke Catmandu::Importer::SRU and Catmandu::Fix::search_sru:
$ catmandu convert -v SRU \
--base http://sru.gbv.de/opac-de-1 \
--recordSchema picaxml \
--query 'pica.xisb=9781501373930' \
--parser picaxml \
to JSON
Oops! encountered object 'PICA::Data=HASH(0x55e91d085808)', but neither allow_blessed, convert_blessed nor allow_tags settings are enabled (or TO_JSON/FREEZE method missing) at /home/jorol/perl5/perlbrew/perls/perl-5.28.1/lib/site_perl/5.28.1/Catmandu/Exporter/JSON.pm line 36.
$ echo '{"isbn":"pica.xisb=9781501373930"}' |\
catmandu convert JSON to JSON \
--fix 'search_sru(isbn,"http://sru.gbv.de/opac-de-1",recordschema:picaxml,parser:picaxml)'
Oops! encountered object 'PICA::Data=HASH(0x55e0a2e8e720)', but neither allow_blessed, convert_blessed nor allow_tags settings are enabled (or TO_JSON/FREEZE method missing) at /home/jorol/perl5/perlbrew/perls/perl-5.28.1/lib/site_perl/5.28.1/Catmandu/Exporter/JSON.pm line 36.
Versions:
I've just release Catmandu::PICA 1.06 to fix this and other problems with Catmandu::PICA and PICA::Data >= 1.27.
I don't remember why I introduced the option
bless
. PICA Data given as hash reference with fieldsrecord
and (optional)_id
should always be blessed. Maybe Catmandu::PICA requires unblessed data structures?