]> git.ipfire.org Git - thirdparty/asterisk.git/commit
manager: Fix GetConfigJSON returning invalid JSON 71/1371/1
authorIvan Poddubny <ivan.poddubny@gmail.com>
Sat, 3 Oct 2015 11:27:27 +0000 (14:27 +0300)
committerIvan Poddubny <ivan.poddubny@gmail.com>
Sat, 3 Oct 2015 13:09:21 +0000 (08:09 -0500)
commit74635b56381c5facaf5b5a6d12a5aa39abf10a0e
treef4ca50ed08fdcc8723175c4e2d7bc1ae10fd6ed7
parentb39e92f036188664aefa494a798253f4f78d11f4
manager: Fix GetConfigJSON returning invalid JSON

When GetConfigJSON was introduced back in 1.6, it returned each
section as an array of strings: ["key=value", "key2=value2"].
Afterwards, it was changed a few times and became
["key": "value", "key2": "value2"], which is not a correct JSON.
This patch fixes that by constructing a JSON object {} instead of
an array [].

Also, the keys "istemplate" and "tempates" that are used to
indicate templates and their inherited categories are now wrapped in
quotes.

ASTERISK-25391 #close
Reported by: Bojan Nemčić

Change-Id: Ibbe93c6a227dff14d4a54b0d152341857bcf6ad8
main/manager.c