<?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/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Reading a Json from a *.json file and saving it to a CDT</title><link>https://community.appian.com/discussions/f/integrations/19823/reading-a-json-from-a-json-file-and-saving-it-to-a-cdt</link><description>Greetings community, 
 I&amp;#39;m having this problem when i&amp;#39;m passing a *.json file thru&amp;#39; a Web API that starts a process model. 
 From within my process model i have a readtextfromfile() function in a script task that gets the text from the JSON file. 
 After</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Reading a Json from a *.json file and saving it to a CDT</title><link>https://community.appian.com/thread/77527?ContentTypeID=1</link><pubDate>Fri, 30 Oct 2020 11:49:20 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a8313f1f-c1e4-4c11-bf5d-fd27d2edb356</guid><dc:creator>Fer1986</dc:creator><description>&lt;p&gt;Helo Danny,&lt;/p&gt;
&lt;p&gt;We control the format of the JSON input,&amp;nbsp; and:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;*readtextfromfile() looks fine in our text process variable (in fact we&amp;#39;ve manipulated it with multiple versions of quotes and double quotes and still we are not able to process it in the a!fromJSON() function)&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;*Same JSON passed as body works fine, however the size of the JSON payload exceeds the allowable string lenght of the body and we don&amp;#39;t want to create a loop making multiple request when is far simpler to just send the file.&lt;/p&gt;
&lt;p&gt;It&amp;#39;s hard to beleive that appian supports sending a JSON file but there is no way to read the file and insert it into the Database.&lt;/p&gt;
&lt;p&gt;Any other input in terms of what the JSON format has to be to succesfully process with the a!fromJSON() to map to the CDT?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The example provided by Mr.&amp;nbsp;&lt;a class="internal-link view-user-profile" href="/members/robert.shankin"&gt;Robert Shankin&lt;/a&gt;&amp;nbsp;in this link:&amp;nbsp;&lt;a href="/discussions/f/data/13238/reading-json-from-json-file?ReplySortBy=CreatedDate&amp;amp;ReplySortOrder=Ascending"&gt;https://community.appian.com/discussions/f/data/13238/reading-json-from-json-file?ReplySortBy=CreatedDate&amp;amp;ReplySortOrder=Ascending&lt;/a&gt;&amp;nbsp;does not work.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Is this perhaps a product bug in version 20.3 ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading a Json from a *.json file and saving it to a CDT</title><link>https://community.appian.com/thread/77526?ContentTypeID=1</link><pubDate>Fri, 30 Oct 2020 08:07:35 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2055bb04-166a-4946-bed3-c084082eca16</guid><dc:creator>Timo</dc:creator><description>&lt;p&gt;Yes, agree maybe it come in different than you expect.&lt;br /&gt;something like textFile.body.jsonString&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading a Json from a *.json file and saving it to a CDT</title><link>https://community.appian.com/thread/77523?ContentTypeID=1</link><pubDate>Thu, 29 Oct 2020 23:13:12 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:af674ecb-f155-484d-84ec-d763ae9b8be5</guid><dc:creator>Danny Verb</dc:creator><description>&lt;p&gt;I recommend also saving the output of readtextfromfile() into a process variable of Text so you can see what the value is for debugging. It might also be easier to pass the JSON directly in the body of your API instead of as a file.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>