diff --git a/src/ioc/dbStatic/dbLexRoutines.c b/src/ioc/dbStatic/dbLexRoutines.c index ff9f04db1..380844dec 100644 --- a/src/ioc/dbStatic/dbLexRoutines.c +++ b/src/ioc/dbStatic/dbLexRoutines.c @@ -1072,6 +1072,12 @@ static void dbRecordInfo(char *name, char *value) if(duplicate) return; ptempListNode = (tempListNode *)ellFirst(&tempList); pdbentry = ptempListNode->item; + if (*value == '"') { + /* jsonSTRING values still have their quotes */ + value++; + value[strlen(value) - 1] = 0; + } + dbTranslateEscape(value, value); /* yuck: in-place, but safe */ status = dbPutInfo(pdbentry,name,value); if(status) { epicsPrintf("Can't set \"%s\" info \"%s\" to \"%s\"\n", diff --git a/src/ioc/dbStatic/dbYacc.y b/src/ioc/dbStatic/dbYacc.y index 25df127ed..e61ce58b0 100644 --- a/src/ioc/dbStatic/dbYacc.y +++ b/src/ioc/dbStatic/dbYacc.y @@ -258,10 +258,11 @@ record_field: tokenFIELD '(' tokenSTRING ',' if(dbStaticDebug>2) printf("record_field %s %s\n",$3,$6); dbRecordField($3,$6); dbmfFree($3); dbmfFree($6); } - | tokenINFO '(' tokenSTRING ',' tokenSTRING ')' + | tokenINFO '(' tokenSTRING ',' + { BEGIN JSON; } json_value { BEGIN INITIAL; } ')' { - if(dbStaticDebug>2) printf("record_info %s %s\n",$3,$5); - dbRecordInfo($3,$5); dbmfFree($3); dbmfFree($5); + if(dbStaticDebug>2) printf("record_info %s %s\n",$3,$6); + dbRecordInfo($3,$6); dbmfFree($3); dbmfFree($6); } | tokenALIAS '(' tokenSTRING ')' {