[libcatmandu-marc-perl] 140/208: Providing documentation on the MARC-in-JSON format #59

Jonas Smedegaard dr at jones.dk
Sat Oct 28 03:42:44 UTC 2017


This is an automated email from the git hooks/post-receive script.

js pushed a commit to annotated tag upstream/1.19
in repository libcatmandu-marc-perl.

commit b12b94e0ef2d5dc5fe7dfc5bed56900b68671523
Author: Patrick Hochstenbach <patrick.hochstenbach at ugent.be>
Date:   Mon May 29 10:22:59 2017 +0200

    Providing documentation on the MARC-in-JSON format #59
---
 Changes                           |  5 +++-
 lib/Catmandu/Exporter/MARC/MiJ.pm | 55 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 59 insertions(+), 1 deletion(-)

diff --git a/Changes b/Changes
index a3a3844..e6b2483 100644
--- a/Changes
+++ b/Changes
@@ -1,12 +1,15 @@
 Revision history for Catmandu-MARC
 
 {{$NEXT}}
+  - Fixing missing space to caret translation in 008 fields for ALEPHSEQ exports
+  - Upgrading to latest MARC::File::XML
+  - Providing documenation on the MARC-in-JSON format
 
 1.11  2017-05-15 09:11:38 CEST
   - Upgrading to MARC::Spec 1.0.0
   - Fixing MARCspec Parser exception
   - Fixing undef values when using $append and split
-  
+
 1.10  2017-05-02 11:48:37 CEST
   - Adding support for nested_arrays and subspecs in marc_spec
 
diff --git a/lib/Catmandu/Exporter/MARC/MiJ.pm b/lib/Catmandu/Exporter/MARC/MiJ.pm
index bf2a7ab..f5d3cf2 100644
--- a/lib/Catmandu/Exporter/MARC/MiJ.pm
+++ b/lib/Catmandu/Exporter/MARC/MiJ.pm
@@ -47,6 +47,61 @@ Binmode of the output stream C<fh>. Set to "C<:utf8>" by default.
 See L<Catmandu::Exporter>, L<Catmandu::Addable>, L<Catmandu::Fixable>,
 L<Catmandu::Counter>, and L<Catmandu::Logger> for a full list of methods.
 
+=head1 FORMAT
+
+The MARC-in-JSON record format contains two fields:
+
+   * 'leader' - the MARC leader
+   * 'fields' - an array of MARC fields
+
+Each item in the MARC fields array contains the MARC tag and as value a hash
+containing three fields:
+
+   * 'subfields' - an array of MARC subfields
+   * 'ind1' - the first indicator of the MARC tag
+   * 'ind2' - the second indicator of the MARC tag
+
+Each subfield item is an hash containing the MARC subfield tag and its value.
+
+An example of one MARC record in the MiJ serialization format is given below:
+
+    {
+      "leader": "0000cam  2200000   4500",
+      "fields": [
+        {
+          "100": {
+            "subfields": [
+              {
+                "a": "Huberman, Leo,"
+              },
+              {
+                "d": "1903-1968."
+              }
+            ],
+            "ind1": "1",
+            "ind2": " "
+          }
+        },
+        {
+          "700": {
+            "subfields": [
+              {
+                "a": "Sweezy, Paul M."
+              },
+              {
+                "q": "(Paul Marlor),"
+              },
+              {
+                "d": "1910-2004."
+              }
+            ],
+            "ind1": "1",
+            "ind2": " "
+          }
+        },
+        ...
+    }
+
 =head1 SEE ALSO
 
 L<Catmandu::Exporter>

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libcatmandu-marc-perl.git



More information about the Pkg-perl-cvs-commits mailing list