[Asterisk-code-review] func_json: Adds JSON_DECODE function (asterisk[master])

Kevin Harwell asteriskteam at digium.com
Wed Nov 17 18:36:58 CST 2021


Attention is currently required from: N A, Joshua Colp.
Kevin Harwell has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/16634 )

Change subject: func_json: Adds JSON_DECODE function
......................................................................


Patch Set 6: Code-Review-1

(3 comments)

File funcs/func_json.c:

https://gerrit.asterisk.org/c/asterisk/+/16634/comment/6b3079eb_fcf45048 
PS6, Line 43: 			Returns the contents of a JSON array at a specified key.
This should be reworded as the function appears to not be returning the contents of a JSON array, but the string value of a JSON object key.


https://gerrit.asterisk.org/c/asterisk/+/16634/comment/9dfd79d0_69e1b65e 
PS6, Line 102: 	json = ast_json_load_string(ast_str_buffer(str), NULL);
You can use 'ast_json_load_str', which basically does what you're doing here if you want.


https://gerrit.asterisk.org/c/asterisk/+/16634/comment/263eb514_e6551207 
PS6, Line 109: 	result = ast_json_object_string_get(json, args.key);
Is it guaranteed that all key values will be of type "string", or should this care about other types too?



-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/16634
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: Iea60c49a7358dfdc2db60803cdc9a742f808ba2c
Gerrit-Change-Number: 16634
Gerrit-PatchSet: 6
Gerrit-Owner: N A <mail at interlinked.x10host.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Attention: N A <mail at interlinked.x10host.com>
Gerrit-Attention: Joshua Colp <jcolp at sangoma.com>
Gerrit-Comment-Date: Thu, 18 Nov 2021 00:36:58 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20211117/bbabccbb/attachment.html>


More information about the asterisk-code-review mailing list