I haven't checked the patches of the PR so far, but fyi, you should be able to execute an RPC command with jsonrpcs_exec(), get the output in a variable that you can parse with jansson module.
Having a dedicated function for config is probably better if you need to use it often.