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

N A asteriskteam at digium.com
Thu Nov 18 13:56:22 CST 2021


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

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


Patch Set 12:

(3 comments)

File funcs/func_json.c:

https://gerrit.asterisk.org/c/asterisk/+/16634/comment/c28161d7_26267f3c 
PS6, Line 109: 	result = ast_json_object_string_get(json, args.key);
> It'd either fail for those cases, or one could 'stringify' them somehow but chances are the latter i […]
Okay, I think if I fall back to doing that as a last resort, then this might be the best of both worlds.


File funcs/func_json.c:

https://gerrit.asterisk.org/c/asterisk/+/16634/comment/c3dec928_52a6b883 
PS11, Line 119: 			result = ast_json_object_string_get(json, args.key);
> You've already retrieved the value above in 'jsonval', so you don't have to look it up by key again  […]
Done


https://gerrit.asterisk.org/c/asterisk/+/16634/comment/92b6f3c7_749c5de6 
PS11, Line 123: 			r = ast_json_object_integer_get(json, args.key);
> Similar for here. You can just call 'ast_json_integer_get(jsonval)' without a second lookup.
Done



-- 
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: 12
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: Joshua Colp <jcolp at sangoma.com>
Gerrit-Attention: Kevin Harwell <kharwell at digium.com>
Gerrit-Comment-Date: Thu, 18 Nov 2021 19:56:22 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: N A <mail at interlinked.x10host.com>
Comment-In-Reply-To: Kevin Harwell <kharwell at digium.com>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20211118/25e83827/attachment.html>


More information about the asterisk-code-review mailing list