INCOMPATIBLE: use :, not =, as separator for jsonf

JSON fields are "name":value, not "name"=value.  Therefore change the
jsonf flag to use a colon.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
Miloslav Trmač 2012-08-24 19:28:59 +02:00 committed by Rainer Gerhards
parent 7580b8c954
commit e48728e80e
2 changed files with 2 additions and 2 deletions

View File

@ -368,7 +368,7 @@ The json option cannot be used together with either jsonf or csv options.
This signifies that the property should be expressed as a json <b>f</b>ield. This signifies that the property should be expressed as a json <b>f</b>ield.
That means not only the property is written, but rather a complete json field in That means not only the property is written, but rather a complete json field in
the format<br> the format<br>
"fieldname"="value"</b> "fieldname":"value"</b>
where "filedname" is the assigend field name (or the property name if none was assigned) where "filedname" is the assigend field name (or the property name if none was assigned)
and value is the end result of property replacer operation. Note that value supports and value is the end result of property replacer operation. Note that value supports
all property replacer options, like substrings, case converson and the like. all property replacer options, like substrings, case converson and the like.

View File

@ -2518,7 +2518,7 @@ jsonField(struct templateEntry *pTpe, uchar **ppRes, unsigned short *pbMustBeFre
dst = es_newStr(buflen+es_strlen(pTpe->data.field.fieldName)+15); dst = es_newStr(buflen+es_strlen(pTpe->data.field.fieldName)+15);
es_addChar(&dst, '"'); es_addChar(&dst, '"');
es_addStr(&dst, pTpe->data.field.fieldName); es_addStr(&dst, pTpe->data.field.fieldName);
es_addBufConstcstr(&dst, "\"=\""); es_addBufConstcstr(&dst, "\":\"");
CHKiRet(jsonAddVal(pSrc, buflen, &dst)); CHKiRet(jsonAddVal(pSrc, buflen, &dst));
es_addChar(&dst, '"'); es_addChar(&dst, '"');