From: Adam Dickmeiss Date: Mon, 9 Dec 2013 09:57:51 +0000 (+0100) Subject: MARC-in-JSON support for record conversion utility X-Git-Tag: v5.0.5~3 X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=commitdiff_plain;h=d7c2d20fef26a64dd97469cc0b6bf02f9eb95981 MARC-in-JSON support for record conversion utility --- 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 : "