This PR replaces the json gem with the sensu-json gem as per #127. There are some limitations that should be considered before this PR should be considered a candidate for merging:
Advantages:
The same JSON library as Sensu Core & Sensu Enterprise
Performance benefits
Disadvantages:
It wraps the Oj gem (except under JRuby) which has C bindings that must be compiled
Parsed JSON (via Sensu::JSON.load) only allows keys to be accessed by symbols -- I think this may break a lot of plugins
I'm not currently in favour of having this merged as-is. I think we need to ensure keys can be accessed via both strings & symbols. I don't have much of an opinion regarding Oj & C bindings as many Sensu plugins already have gem dependencies with C bindings.
Any feedback, criticism, or corrections will all be greatly appreciated!
After thinking about this a bit more and discussing it with @portertech, I'm going to close this PR. I'll investigate using stdlib json and multi-json as alternatives.
This PR replaces the json gem with the sensu-json gem as per #127. There are some limitations that should be considered before this PR should be considered a candidate for merging:
Advantages:
Disadvantages:
Sensu::JSON.load
) only allows keys to be accessed by symbols -- I think this may break a lot of pluginsI'm not currently in favour of having this merged as-is. I think we need to ensure keys can be accessed via both strings & symbols. I don't have much of an opinion regarding Oj & C bindings as many Sensu plugins already have gem dependencies with C bindings.
Any feedback, criticism, or corrections will all be greatly appreciated!