Fix yaz_use_attribute_create (uninit memory)
[yaz-moved-to-github.git] / src / record_render.c
index 82da22c..1291858 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2013 Index Data
+ * Copyright (C) Index Data
  * See the file LICENSE for details.
  */
 /**
@@ -169,6 +169,7 @@ static const char *return_record_wrbuf(WRBUF wrbuf, int *len,
     {
         if (oid_oidcmp(oid, yaz_oid_recsyn_xml)
             && oid_oidcmp(oid, yaz_oid_recsyn_application_xml)
+            && oid_oidcmp(oid, yaz_oid_recsyn_mab)
             && oid_oidcmp(oid, yaz_oid_recsyn_html))
         {
             const char *ret_buf = return_marc_record(
@@ -444,6 +445,11 @@ const char *yaz_record_render(Z_NamePlusRecord *npr, const char *schema,
         ret = get_record_format(wrbuf, len, npr, YAZ_MARC_TURBOMARC, charset,
                                 format);
     }
+    else if (!strcmp(type, "json"))
+    {
+        ret = get_record_format(wrbuf, len, npr, YAZ_MARC_JSON, charset,
+                                format);
+    }
     else if (!strcmp(type, "raw"))
     {
         ret = get_record_format(wrbuf, len, npr, YAZ_MARC_ISO2709, charset,