Generate JSON5 when available

Fixes lp: #2029482 / GitHub #92
This commit is contained in:
Andrew Johnson
2023-08-06 20:45:08 -05:00
committed by mdavidsaver
parent b7ad4478a4
commit 45018a2163
2 changed files with 5 additions and 0 deletions

View File

@@ -5,6 +5,8 @@
Release 8.0.6 (UNRELEASED)
========================
- Compatible changes
- Actually enable JSON-5 output in PVStructure::Formatter::JSON when available.
Release 8.0.5 (Sep 2022)
========================

View File

@@ -404,6 +404,9 @@ std::ostream& operator<<(std::ostream& strm, const PVStructure::Formatter& forma
if(format.xfmt==PVStructure::Formatter::JSON) {
JSONPrintOptions opts;
opts.multiLine = false;
#if EPICS_VERSION_INT>=VERSION_INT(7,0,6,1)
opts.json5 = true;
#endif
printJSON(strm, format.xtop, format.xshow ? *format.xshow : BitSet().set(0), opts);
strm<<'\n';
return strm;