From: Chase Miller Date: Wed, 24 Jul 2013 17:02:09 +0000 (-0400) Subject: Fix invalid json output X-Git-Url: https://git.donarmstrong.com/?p=bamtools.git;a=commitdiff_plain;h=ffe08406d4839cc92238a9a65e09c630330f5065 Fix invalid json output add quotes to the filename variable so that the json outputed is valid json --- diff --git a/src/toolkit/bamtools_convert.cpp b/src/toolkit/bamtools_convert.cpp index b0aae07..54820e7 100644 --- a/src/toolkit/bamtools_convert.cpp +++ b/src/toolkit/bamtools_convert.cpp @@ -423,7 +423,7 @@ void ConvertTool::ConvertToolPrivate::PrintJson(const BamAlignment& a) { } // write alignment's source BAM file - m_out << "\"filename\":" << a.Filename << ","; + m_out << "\"filename\":\"" << a.Filename << "\","; // write tag data const char* tagData = a.TagData.c_str();