<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>1 comment:</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/2527adb2_dcc4b088">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;">Hmm, I swear I tested it with int values and it seemed to work fine. […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">It has to do with the way JSON works in general. For example:</p><p style="white-space: pre-wrap; word-wrap: break-word;">{ "key1": "123" }</p><p style="white-space: pre-wrap; word-wrap: break-word;">is not the same as:</p><p style="white-space: pre-wrap; word-wrap: break-word;">{ "key2": 123 }</p><p style="white-space: pre-wrap; word-wrap: break-word;">The first has a string key and value ("123" is quoted). The second has a string key, and an integer value (123 is not quoted).</p><p style="white-space: pre-wrap; word-wrap: break-word;">As well what about the following:</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">{<br>  "key3": 123.45,<br>  "key4": true,<br>  "key5": [ 1, 2, 3],<br>  "key6": { "key7": 789 },<br>}</pre><p style="white-space: pre-wrap; word-wrap: break-word;">If you searched for any of those values by key your current code would return NULL, I assume, as none of those are JSON string values.</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: 9 </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 17:07:25 +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>