From d7c2d20fef26a64dd97469cc0b6bf02f9eb95981 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 9 Dec 2013 10:57:51 +0100 Subject: [PATCH] MARC-in-JSON support for record conversion utility --- src/record_conv.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/record_conv.c b/src/record_conv.c index ff95f92..671342c 100644 --- a/src/record_conv.c +++ b/src/record_conv.c @@ -388,6 +388,10 @@ static void *construct_marc(const xmlNode *ptr, if (!info->input_charset && info->output_charset) info->input_charset = "utf-8"; } + else if (!strcmp(input_format, "json")) + { + info->input_format_mode = YAZ_MARC_JSON; + } else { wrbuf_printf(wr_error, "Element : " @@ -431,6 +435,12 @@ static void *construct_marc(const xmlNode *ptr, if (info->input_charset && !info->output_charset) info->output_charset = "utf-8"; } + else if (!strcmp(output_format, "json")) + { + info->output_format_mode = YAZ_MARC_JSON; + if (info->input_charset && !info->output_charset) + info->output_charset = "utf-8"; + } else { wrbuf_printf(wr_error, "Element : " -- 1.7.10.4