The version of yajl that comes with Base 7.0.6.1 and later can generate JSON5 which handles infinities and NaN values, but it looks like the pvAccess code in pvget isn't enabling that option in the print formatter. Applying the following patch to modules/pvData should fix it:
The version of yajl that comes with Base 7.0.6.1 and later can generate JSON5 which handles infinities and NaN values, but it looks like the pvAccess code in pvget isn't enabling that option in the print formatter. Applying the following patch to modules/pvData should fix it:
diff --git a/src/factory/ printer. cpp b/src/factory/ printer. cpp printer. cpp printer. cpp <(std:: ostream& strm, const PVStructure: :Formatter& forma format. xfmt==PVStructu re::Formatter: :JSON) {
JSONPrintOpti ons opts;
opts. multiLine = false; INT>=VERSION_ INT(7,0, 6,1)
printJSON( strm, format.xtop, format.xshow ? *format.xshow : BitSet().set(0), opts);
strm< <'\n';
index 928fc4f..31f7116 100644
--- a/src/factory/
+++ b/src/factory/
@@ -404,6 +404,9 @@ std::ostream& operator<
if(
+#if EPICS_VERSION_
+ opts.json5 = true;
+#endif
return strm;
Given that this is actually a bug against pvDataCPP I have filed an issue against that module on GitHub referring to this bug report: https:/ /github. com/epics- base/pvDataCPP/ issues/ 92