X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=include%2Fyaz%2Fmarcdisp.h;h=0d029c515d8866a2915106d618686e28197f65fc;hb=e529ed18a6825f980bb16b230e56c6d53743ced1;hp=f1eaae89e3ac5303ff684e6775cc496f487321f0;hpb=3d95738e1464a966faae513cbaff87e9f9ff2b47;p=yaz-moved-to-github.git diff --git a/include/yaz/marcdisp.h b/include/yaz/marcdisp.h index f1eaae8..0d029c5 100644 --- a/include/yaz/marcdisp.h +++ b/include/yaz/marcdisp.h @@ -76,6 +76,8 @@ YAZ_EXPORT void yaz_marc_xml(yaz_marc_t mt, int xmlmode); #define YAZ_MARC_CHECK 6 /** \brief Output format: Turbo MARC Index Data format (XML based) */ #define YAZ_MARC_TURBOMARC 7 +/** \brief Output format: JSON */ +#define YAZ_MARC_JSON 8 /** \brief set iconv handle for character set conversion */ YAZ_EXPORT void yaz_marc_iconv(yaz_marc_t mt, yaz_iconv_t cd); @@ -260,6 +262,15 @@ int yaz_marc_write_xml(yaz_marc_t mt, xmlNode **root_ptr, const char *type); #endif +/** \brief writes MARC record in JSON represenation + \param mt handle + \param w WRBUF for output + \retval 0 Creation successful + \retval -1 ERROR +*/ +YAZ_EXPORT +int yaz_marc_write_json(yaz_marc_t mt, WRBUF w); + /** \brief sets leader spec (for modifying bytes in 24 byte leader) \param mt handle \param leader_spec