Comment 1 for bug 1714455

Revision history for this message
Andrew Johnson (anj) wrote :

The YAJL JSON parser library that we use for channel filters and new link types currently only supports strict JSON. The 3.16 DB file parser (implemented in Lex & Yacc) actually converts relaxed JSON into strict JSON for YAJL to parse, and IIRC this means that when setting a new link type at run-time you also have to use strict JSON syntax.

My 'relaxed JSON' rules are actually very similar to a new standard called JSON-5 (which is not meant to replace the original, its syntax updates come from modifications to JavaScript since the original came out). Unfortunately nobody else had started working on adding JSON-5 support to YAJL, and it looks like the original author of the library has abandoned that project so we probably won't see support for JSON-5 added unless we do it ourselves.

I have made a few changes to our copy of the YAJL parser which I'm hoping will be merged into Base by the EPICS 7 release (see https://code.launchpad.net/~epics-core/epics-base/+git/int64/+merge/325537), but so far all I've done is update our copy to yajl-2.1.0, add support for trailing commas in lists and maps, and pull in all the YAJL parser tests. I would be happy to see someone take on the task of extending the parser to support JSON-5.