[Asterisk-code-review] func_json: Adds JSON_DECODE function (asterisk[master])
N A
asteriskteam at digium.com
Thu Nov 18 11:33:59 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 9:
(1 comment)
File funcs/func_json.c:
https://gerrit.asterisk.org/c/asterisk/+/16634/comment/4e5e32bd_99402652
PS6, Line 109: result = ast_json_object_string_get(json, args.key);
> It has to do with the way JSON works in general. For example: […]
Okay, I see what you mean now. Yeah, the test fails if I have an integer without quotes.
I don't think recursing through everything is in scope here, the goal would be to retrieve the first key, get its value as another string, and then parse that as JSON and look for the next key. But otherwise, yeah, I think it makes sense for it to work with these different types. I'm surprised there isn't already public API to return the value, regardless of what type it is.
--
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: 9
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 17:33:59 +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/c6bb12ba/attachment.html>
More information about the asterisk-code-review
mailing list