Skip to content

Commit 8a9f665

Browse files
authored
Merge 17736b2 into 1c5f75b
2 parents 1c5f75b + 17736b2 commit 8a9f665

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/factory/printer.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -401,12 +401,11 @@ void printRaw(std::ostream& strm, const PVStructure::Formatter& format, const PV
401401

402402
std::ostream& operator<<(std::ostream& strm, const PVStructure::Formatter& format)
403403
{
404-
if(format.xfmt==PVStructure::Formatter::JSON) {
404+
if(format.xfmt==PVStructure::Formatter::JSON || \
405+
format.xfmt==PVStructure::Formatter::JSON5) {
405406
JSONPrintOptions opts;
406407
opts.multiLine = false;
407-
#if EPICS_VERSION_INT>=VERSION_INT(7,0,6,1)
408-
opts.json5 = true;
409-
#endif
408+
opts.json5 = format.xfmt==PVStructure::Formatter::JSON5 ? true : false;
410409
printJSON(strm, format.xtop, format.xshow ? *format.xshow : BitSet().set(0), opts);
411410
strm<<'\n';
412411
return strm;

src/pv/pvData.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -881,6 +881,7 @@ class epicsShareClass PVStructure : public PVField, public BitSetSerializable
881881
Raw,
882882
NT,
883883
JSON,
884+
JSON5,
884885
};
885886
private:
886887
const PVStructure& xtop;

0 commit comments

Comments
 (0)