return 0;
}
+char *dummy_json_record(int num, ODR odr, const char *esn)
+{
+ if (!esn || !strcmp(esn, "marcinjson"))
+ {
+ char *rec = dummy_marc_record(num, odr);
+ if (rec)
+ {
+ WRBUF w = wrbuf_alloc();
+ yaz_marc_t mt = yaz_marc_create();
+ yaz_marc_xml(mt, YAZ_MARC_JSON);
+ yaz_marc_decode_wrbuf(mt, rec, -1, w);
+ rec = odr_strdup(odr, wrbuf_cstr(w));
+ yaz_marc_destroy(mt);
+ wrbuf_destroy(w);
+ return rec;
+ }
+ }
+ return 0;
+}
+
/*
* Local variables:
* c-basic-offset: 4
return 0;
}
}
+ else if (!oid_oidcmp(oid, yaz_oid_recsyn_json))
+ {
+ if ((cp = dummy_json_record(r->number, r->stream, esn)))
+ {
+ r->len = strlen(cp);
+ r->record = cp;
+ r->schema = "info:srw/schema/1/marcxml-1.1";
+ }
+ else
+ {
+ r->errcode = YAZ_BIB1_SYSTEM_ERROR_IN_PRESENTING_RECORDS;
+ r->surrogate_flag = 1;
+ return 0;
+ }
+ }
else
{
char buf[OID_STR_MAX];
Z_GenericRecord *dummy_grs_record(int num, ODR o);
char *dummy_marc_record(int num, ODR odr);
char *dummy_xml_record(int num, ODR odr, const char *esn);
+char *dummy_json_record(int num, ODR odr, const char *esn);
Z_OPACRecord *dummy_opac(int num, ODR odr, const char *marc_input);
/*