<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>KB-1243 "The jsonText parameter of a!fromJson() was not valid JSON" error thrown when executing a!fromJson() querying a JSON object with a null value</title><link>https://community.appian.com/support/w/kb/458/kb-1243-the-jsontext-parameter-of-a-fromjson-was-not-valid-json-error-thrown-when-executing-a-fromjson-querying-a-json-object-with-a-null-value</link><description /><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>KB-1243 "The jsonText parameter of a!fromJson() was not valid JSON" error thrown when executing a!fromJson() querying a JSON object with a null value</title><link>https://community.appian.com/support/w/kb/458/kb-1243-the-jsontext-parameter-of-a-fromjson-was-not-valid-json-error-thrown-when-executing-a-fromjson-querying-a-json-object-with-a-null-value</link><pubDate>Mon, 30 Jul 2018 04:01:54 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ec80d352-8f86-4159-bbfc-f7dcc935b238</guid><dc:creator>Parmida Borhani</dc:creator><comments>https://community.appian.com/support/w/kb/458/kb-1243-the-jsontext-parameter-of-a-fromjson-was-not-valid-json-error-thrown-when-executing-a-fromjson-querying-a-json-object-with-a-null-value#comments</comments><description>Current Revision posted to Appian Knowledge Base by Parmida Borhani on 7/30/2018 4:01:54 AM&lt;br /&gt;
&lt;div class="row content_container"&gt;
&lt;h2 id="symptoms"&gt;Symptoms&lt;/h2&gt;
&lt;p&gt;An expression rule cannot evaluate a!fromJson() for a JSON object that contains a null value. The following error is seen:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Expression evaluation error at function a!fromJson: 

Error evaluating function fn!fromjson_appian_internal : The jsonText parameter of a!fromJson() was not valid JSON. Received: {&amp;quot;value&amp;quot;:[null,null]}.
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id="cause"&gt;Cause&lt;/h2&gt;
&lt;p&gt;The JSON string contains an invalid value that cannot be parsed (in this case &amp;ldquo;null&amp;rdquo;).&lt;/p&gt;
&lt;h2 id="action"&gt;Action&lt;/h2&gt;
&lt;p&gt;In Appian, &amp;ldquo;&amp;rdquo; should be used to represent a null value that is to be pushed to a JSON object instead using the literal &amp;ldquo;null&amp;rdquo; or null(). E.g.:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{&amp;quot;value&amp;quot;:[&amp;ldquo;&amp;rdquo;,&amp;ldquo;&amp;rdquo;)]}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id="affected-versions"&gt;Affected Versions&lt;/h2&gt;
&lt;p&gt;This article applies to all versions of Appian.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Last Reviewed:&amp;nbsp;March 2017&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: expression rules, application design&lt;/div&gt;
</description></item><item><title>KB-1243 "The jsonText parameter of a!fromJson() was not valid JSON" error thrown when executing a!fromJson() querying a JSON object with a null value</title><link>https://community.appian.com/support/w/kb/458/kb-1243-the-jsontext-parameter-of-a-fromjson-was-not-valid-json-error-thrown-when-executing-a-fromjson-querying-a-json-object-with-a-null-value/revision/1</link><pubDate>Mon, 06 Mar 2017 22:33:30 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ec80d352-8f86-4159-bbfc-f7dcc935b238</guid><dc:creator>Nick Vigilante</dc:creator><comments>https://community.appian.com/support/w/kb/458/kb-1243-the-jsontext-parameter-of-a-fromjson-was-not-valid-json-error-thrown-when-executing-a-fromjson-querying-a-json-object-with-a-null-value#comments</comments><description>Revision 1 posted to Appian Knowledge Base by Nick Vigilante on 3/6/2017 10:33:30 PM&lt;br /&gt;
&lt;div class="row content_container"&gt;
&lt;h2 id="symptoms"&gt;Symptoms&lt;/h2&gt;
&lt;p&gt;An expression rule cannot evaluate a!fromJson() for a JSON object that contains a null value. The following error is seen:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Expression evaluation error at function a!fromJson: 

Error evaluating function fn!fromjson_appian_internal : The jsonText parameter of a!fromJson() was not valid JSON. Received: {&amp;quot;value&amp;quot;:[null,null]}.
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id="cause"&gt;Cause&lt;/h2&gt;
&lt;p&gt;The JSON string contains an invalid value that cannot be parsed (in this case &amp;ldquo;null&amp;rdquo;).&lt;/p&gt;
&lt;h2 id="action"&gt;Action&lt;/h2&gt;
&lt;p&gt;In Appian, &amp;ldquo;&amp;rdquo; should be used to represent a null value that is to be pushed to a JSON object instead using the literal &amp;ldquo;null&amp;rdquo; or null(). E.g.:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{&amp;quot;value&amp;quot;:[&amp;ldquo;&amp;rdquo;,&amp;ldquo;&amp;rdquo;)]}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id="affected-versions"&gt;Affected Versions&lt;/h2&gt;
&lt;p&gt;This article applies to all versions of Appian.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Last Reviewed:&amp;nbsp;March 2017&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: expression rules&lt;/div&gt;
</description></item></channel></rss>