diff options
author | Miloslav Trmač <mitr@redhat.com> | 2012-09-03 17:53:56 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2012-09-04 10:16:58 +0200 |
commit | b38fa5219f2f8ae3b6366ab911d9662f9340f70d (patch) | |
tree | d22342d4b8eb62a498921db8d59d284ecbaf650c | |
parent | d8e7609abbda70ea5daae8de40749e7377bf99c2 (diff) | |
download | rsyslog-b38fa5219f2f8ae3b6366ab911d9662f9340f70d.tar.gz rsyslog-b38fa5219f2f8ae3b6366ab911d9662f9340f70d.tar.bz2 rsyslog-b38fa5219f2f8ae3b6366ab911d9662f9340f70d.zip |
Set value of a mandatory JSON field to null
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
-rw-r--r-- | template.c | 7 |
1 files changed, 1 insertions, 6 deletions
@@ -307,14 +307,9 @@ rsRetVal tplToJSON(struct template *pTpl, msg_t *pMsg, struct json_object **pjso } else { DBGPRINTF("tplToJSON: error %d looking up property\n", localRet); -#if 0 /* TODO: as it looks, there currently is no way to define Null field values in json-c... - we need to think how we will handle that. - */ if(pTpe->data.field.options.bMandatory) { - jsonf = json_object_new(json_type_null); //json_object_new_null(); - json_object_object_add(json, (char*)pTpe->fieldName, jsonf); + json_object_object_add(json, (char*)pTpe->fieldName, NULL); } -#endif } } else { pVal = (uchar*) MsgGetProp(pMsg, pTpe, pTpe->data.field.propid, |