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

Kevin Harwell asteriskteam at digium.com
Thu Nov 18 11:46:31 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 9:

(1 comment)

File funcs/func_json.c:

https://gerrit.asterisk.org/c/asterisk/+/16634/comment/b6403847_79fc02d4 
PS6, Line 109: 	result = ast_json_object_string_get(json, args.key);
> Okay, I see what you mean now. Yeah, the test fails if I have an integer without quotes. […]
There is. You can use 'ast_json_object_get', and then pass the returned value to ast_json_typeof, and then switch off that. Alternatively you can use iterators.

I agree though recursing into sub-objects can be left out at this time. Can always be added later if it seems like it'll be needed.

For unsupported types I'd just output an unsupported warning or something.



-- 
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: N A <mail at interlinked.x10host.com>
Gerrit-Attention: Joshua Colp <jcolp at sangoma.com>
Gerrit-Comment-Date: Thu, 18 Nov 2021 17:46:31 +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/f8bdf8f0/attachment.html>


More information about the asterisk-code-review mailing list