This sounds like you looked at v6, not v7 (now master branch). V6 can't do that.
Rest of comments later. Rainer Sent from phone, thus brief. Miloslav Trmac <[email protected]> hat geschrieben: Hello, ----- Original Message ----- > quick update: I have just committed the ability to pass the JSON > object natively to output modules in v7-devel. This permits to > preserve types. Full subtrees can be passed by simply specifying the > root of that subtree. To add all data, simply use "!". I don't think the current code can do it - msgCEEPropJSON always runs > *pjson = json_object_object_get(parent, (char*)leaf); choosing a subobject. Also, looking at tplToJSON, it seems that even if the above worked, it wouldn't be possible to pass the full JSON object in the root of the structure, only in a subobject (i.e. > @cee: { "foo": "bar" } could be stored in MongoDB as > { "all": "{ foo": "bar" }} but not as > { "foo": "bar" } Have I misread the code? (Admittedly it makes more sense to store the original data in a subobject, and add metadata to the top level - but with the lack of hierarchy in v6, that would make a v6 implementation of even a subset impossible. I'm not sure how much that matters.) > Please note that json-c seems to be unable to create JSON Null > values. As such, the "mandatory field" attribute currently has no > effect. I will try to work with the json-c team to see if there is a > solution. This is done by simply passing a NULL value of "struct json_object *". The 0.9 code doesn't handle this consistently, and manual checks for NULL are necessary; the current git tree is much nicer. The master branch at http://fedorapeople.org/cgit/mitr/public_git/rsyslog.git/ implements the handling of nulls, and I'll add some memory leak fixes there. Mirek _______________________________________________ rsyslog mailing list http://lists.adiscon.net/mailman/listinfo/rsyslog http://www.rsyslog.com/professional-services/ What's up with rsyslog? Follow https://twitter.com/rgerhards _______________________________________________ rsyslog mailing list http://lists.adiscon.net/mailman/listinfo/rsyslog http://www.rsyslog.com/professional-services/ What's up with rsyslog? Follow https://twitter.com/rgerhards

