-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a parameter skipempty to the json field type. #305
base: master
Are you sure you want to change the base?
Conversation
If skipempty is set as follows, empty json objects are dropped from the parsed result. %field_name:json:skipempty% If any parameter other than "skipempty" is given ("bogus" in this example), an error message "invalid flag for JSON parser: bogus" is issued. Add test for the skipempty parameter.
Dependency on libfastjson needs to be updated to 0.99.8 or later to pick up rsyslog/libfastjson#155
|
@rgerhards, sorry about this slow post. I double-checked libfastjson and learned rsyslog/libfastjson#155 is merged to the master branch, but it's not in the tagged release. The latest libfastjson version is v0.99.8 which was released on Dec 18 2017 and 9 commits were merged to the master branch since then. pr/155 is one of them. Thus, this pr fails the tests even with the libfastjson v0.99.8... :( It requires new version of libfastjson including rsyslog/libfastjson#155.
Note: it's a bit tricky since libfastjson v0.99.8 contains this commit pr#155, which is different from what we'd like to have.
Could there be a plan to release libfastjson 0.99.9 containing the 9 commits? And does this PR have a chance to be tested and merged? Thanks! |
libfastjson - Adding "void fjson_object_array_del_idx(struct fjson_object *jso, int idx)", which deletes the idx-th element in the array type object. upstream PR: rsyslog/libfastjson#155 liblognorm - Adding a parameter skipempty to the json field type. If skipempty is set as follows, empty json objects are dropped from the parsed result. %field_name:json:skipempty% If any parameter other than "skipempty" is given ("bogus" in this example), an error message "invalid flag for JSON parser: bogus" is issued. Add test for the skipempty parameter. upstream PR: rsyslog/liblognorm#305
Hi, libfastjson has been rebased to 0.99.9 . Could you rerun the tests with the latest libfastjson? |
If skipempty is set as follows, empty json objects are dropped from
the parsed result.
%field_name:json:skipempty%
If any parameter other than "skipempty" is given ("bogus" in this
example), an error message "invalid flag for JSON parser: bogus"
is issued.
Add test for the skipempty parameter.