projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Happy new year
[yaz-moved-to-github.git]
/
src
/
record_conv.c
diff --git
a/src/record_conv.c
b/src/record_conv.c
index
ff95f92
..
34a3cc3
100644
(file)
--- a/
src/record_conv.c
+++ b/
src/record_conv.c
@@
-1,5
+1,5
@@
/* This file is part of the YAZ toolkit.
/* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2013 Index Data
+ * Copyright (C) Index Data
* See the file LICENSE for details.
*/
/**
* See the file LICENSE for details.
*/
/**
@@
-388,6
+388,10
@@
static void *construct_marc(const xmlNode *ptr,
if (!info->input_charset && info->output_charset)
info->input_charset = "utf-8";
}
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 <marc inputformat='%s'>: "
else
{
wrbuf_printf(wr_error, "Element <marc inputformat='%s'>: "
@@
-431,6
+435,12
@@
static void *construct_marc(const xmlNode *ptr,
if (info->input_charset && !info->output_charset)
info->output_charset = "utf-8";
}
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 <marc outputformat='%s'>: "
else
{
wrbuf_printf(wr_error, "Element <marc outputformat='%s'>: "