I’m trying to save the output of a call to maapi_save_config in JSON and despite all APIs suggesting the call succeeded I’m not able to actually retrieve any output after calling “recv” on my stream socket. I’m able to successfully call maapi_save_config and retrieve information in all other formats (MAAPI_CONFIG_XML, MAAPI_CONFIG_XML_PRETTY, MAAPI_CONFIG_J, MAAPI_CONFIG_C, MAAPI_CONFIG_C_IOS). Is “MAAPI_CONFIG_JSON” supported in ConfD basic?
But this doesn’t seem to work in ConfD Basic. It could be that since neither REST or WebUI are included in ConfD Basic, that the support for JSON is not included. This does work, as Jonas suggested, in ConfD Premium.
Thanks for the responses Jonas and Greg. I had a friend run a quick test for me on his version of premium and it looks like the JSON output is much too slow for my needs anyway so I’ll simply operate on XML data.
For the curious: the particular path in his model that he queried took 37s to response for JSON output and only 1.1 for XML. I need my data in JSON but at those speeds it would be faster for me to do the conversion myself.
Unfortunately the data model is proprietary and since this was an off-the-cuff test on my behalf I have no idea what the sample data looked like. Even if speed weren’t a factor the inconsistency of being able to only retrieve data using JSON (via maapi_save_config) but not set data using JSON (via maapi_load_config) is enough to make me revert to manually doing XML <> JSON conversions myself. If this is merely an oversight in the manual and you can in fact call maapi_load_config with JSON then I might revisit the possibility of using JSON directly. If/when this happens I would be happy to share a more extensive benchmark setup and findings.