Skip to content

Commit

Permalink
Generate JSON5 when available
Browse files Browse the repository at this point in the history
Fixes lp: #2029482 / GitHub #92
  • Loading branch information
anjohnson authored and mdavidsaver committed Aug 7, 2023
1 parent b7ad447 commit 45018a2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions documentation/release_notes.dox
Original file line number Diff line number Diff line change
Expand Up @@ -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)
========================
Expand Down
3 changes: 3 additions & 0 deletions src/factory/printer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 45018a2

Please sign in to comment.