* All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
/** \brief set iconv handle for character set conversion */
YAZ_EXPORT void yaz_marc_iconv(yaz_marc_t mt, yaz_iconv_t cd);
/** \brief set iconv handle for character set conversion */
YAZ_EXPORT void yaz_marc_iconv(yaz_marc_t mt, yaz_iconv_t cd);
+/** \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);
+
\param buf_in XML buffer
\param size_in size of XML buffer
\param dst Z39.50 OPAC result - allocated by NMEM on marc handle
\param cd iconv handle for the OPAC content (not ISO2709 part)
\param nmem memory for OPACRecord (if NULL, mt NMEM memory is used)
\param buf_in XML buffer
\param size_in size of XML buffer
\param dst Z39.50 OPAC result - allocated by NMEM on marc handle
\param cd iconv handle for the OPAC content (not ISO2709 part)
\param nmem memory for OPACRecord (if NULL, mt NMEM memory is used)
\retval 1 conversion OK
\retval 0 conversion NOT OK
\*/
YAZ_EXPORT int yaz_xml_to_opac(yaz_marc_t mt,
const char *buf_in, size_t size_in,
Z_OPACRecord **dst, yaz_iconv_t cd,
\retval 1 conversion OK
\retval 0 conversion NOT OK
\*/
YAZ_EXPORT int yaz_xml_to_opac(yaz_marc_t mt,
const char *buf_in, size_t size_in,
Z_OPACRecord **dst, yaz_iconv_t cd,