<p> Attention is currently required from: N A, Joshua Colp. </p>
<p><a href="https://gerrit.asterisk.org/c/asterisk/+/16634">View Change</a></p><p>3 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="null">File funcs/func_json.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/16634/comment/05b118af_9b43f0cd">Patch Set #6, Line 109:</a> <code style="font-family:monospace,monospace"> result = ast_json_object_string_get(json, args.key);</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">I see how it would be done for string and int, but what about array or any of the other stuff? Not s […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">It'd either fail for those cases, or one could 'stringify' them somehow but chances are the latter is not what someone would want/expect.</p><p style="white-space: pre-wrap; word-wrap: break-word;">Perhaps an api call can be added later if the need arises again.</p><p style="white-space: pre-wrap; word-wrap: break-word;">Another option I just thought, is you might be able to just call 'ast_json_dump_string'. I assume if you pass that function, say an integer object it'll just convert the integer to string. That however has the overhead of allocating a new string.</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="null">File funcs/func_json.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/16634/comment/3381f09c_ca4a4103">Patch Set #11, Line 119:</a> <code style="font-family:monospace,monospace">                   result = ast_json_object_string_get(json, args.key);</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">You've already retrieved the value above in 'jsonval', so you don't have to look it up by key again here if you don't want. You can just call 'ast_json_string_get(jsonval)'.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/16634/comment/411cca71_ca38b5a1">Patch Set #11, Line 123:</a> <code style="font-family:monospace,monospace">                       r = ast_json_object_integer_get(json, args.key);</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Similar for here. You can just call 'ast_json_integer_get(jsonval)' without a second lookup.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/16634">change 16634</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/16634"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Iea60c49a7358dfdc2db60803cdc9a742f808ba2c </div>
<div style="display:none"> Gerrit-Change-Number: 16634 </div>
<div style="display:none"> Gerrit-PatchSet: 11 </div>
<div style="display:none"> Gerrit-Owner: N A <mail@interlinked.x10host.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-Attention: N A <mail@interlinked.x10host.com> </div>
<div style="display:none"> Gerrit-Attention: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Thu, 18 Nov 2021 18:34:03 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Comment-In-Reply-To: N A <mail@interlinked.x10host.com> </div>
<div style="display:none"> Comment-In-Reply-To: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: comment </div>