<?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>Getting Infinity issues from api response</title><link>https://community.appian.com/discussions/f/general/14809/getting-infinity-issues-from-api-response</link><description>Hi All, 
 
 I get this response from one of the integration, 
 { &amp;quot;media_id&amp;quot;: 710511363345354753, &amp;quot;media_id_string&amp;quot;: &amp;quot;710511363345354753&amp;quot;, &amp;quot;size&amp;quot;: 11065, &amp;quot;expires_after_secs&amp;quot;: 86400, &amp;quot;image&amp;quot;: { &amp;quot;image_type&amp;quot;: &amp;quot;image/jpeg&amp;quot;, &amp;quot;w&amp;quot;: 800, &amp;quot;h&amp;quot;: 320 } } 
 once</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Getting Infinity issues from api response</title><link>https://community.appian.com/thread/66350?ContentTypeID=1</link><pubDate>Mon, 06 May 2019 13:44:26 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:43737214-c348-41e1-89ec-743873b785c8</guid><dc:creator>davel001150</dc:creator><description>&lt;p&gt;These are your options:&lt;/p&gt;
&lt;p&gt;1 Use another API&lt;/p&gt;
&lt;p&gt;2 Figure out how to get the API to acknowledge a string because it has to be a string&lt;/p&gt;
&lt;p&gt;3 Create a Java plugin that can convert your media_id_string to a long numeral format&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Appian does not support that number.&amp;nbsp;&amp;nbsp;&lt;span&gt;710511363345354753 simply cannot ever be expressed as a literal numeric value with all it&amp;#39;s digits in Appian no matter how hard you try.&amp;nbsp; You&amp;#39;re at 710 quadrillion, and the max safe integer value for 64 bit Double type is only a little above 9 quadrillion; you can&amp;#39;t even store that in the Decimal type accurately.&amp;nbsp; You&amp;#39;re about two orders of magnitude above the maximum odd integer that will fit in the variable.&amp;nbsp; You&amp;#39;d need a Java BigDecimal or&amp;nbsp;Java&amp;nbsp;long type or a C# Decimal to have a hope of storing it all.&amp;nbsp; The makers of this API were honestly quite foolish to demand a numeric value this long.&amp;nbsp; An ID should never be a numeric value anyway.&amp;nbsp; I would never store a social security number as anything but a string, especially since social security numbers can begin with a zero.&amp;nbsp; The main problem is that leaving them as a numeric type can cause developers to mistakenly perform arithmetic on it.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;This is not Appian&amp;#39;s fault.&amp;nbsp; This is the API&amp;#39;s fault, honestly.&amp;nbsp; I don&amp;#39;t understand either why the number is that large or even how it is that large.&amp;nbsp; How did they even return a JSON number that large?&amp;nbsp; Javascript uses exclusively 64 bit Double float type for numbers, so again wouldn&amp;#39;t JSON have a cap at 9 quadrillion?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Getting Infinity issues from api response</title><link>https://community.appian.com/thread/66274?ContentTypeID=1</link><pubDate>Thu, 02 May 2019 09:55:50 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:28345681-af7d-4ce1-817c-5e3a2481dccb</guid><dc:creator>bhanuprakash1303</dc:creator><description>&lt;p&gt;&lt;span&gt;media_id_string is not a parameter for api&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Getting Infinity issues from api response</title><link>https://community.appian.com/thread/66272?ContentTypeID=1</link><pubDate>Thu, 02 May 2019 09:06:32 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e84b0dc9-e50e-4271-9f87-f0c7e22d2884</guid><dc:creator>Krishna Chaitanya Mallavarapu</dc:creator><description>&lt;p&gt;If number integer is more that nine digits then it will show as&amp;nbsp;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&amp;infin;) in appian ,so we have converted it in to decimal,by passing decimal also you are not getting result.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;it is easy if the parameter for api is &amp;quot;&lt;span&gt;media_id_string&lt;/span&gt;&amp;quot;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Getting Infinity issues from api response</title><link>https://community.appian.com/thread/66271?ContentTypeID=1</link><pubDate>Thu, 02 May 2019 08:47:13 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:78c307ed-e311-4ebd-bfd1-f7599187d62a</guid><dc:creator>bhanuprakash1303</dc:creator><description>&lt;p&gt;even it is not working. {&amp;quot;errors&amp;quot;:[{"code":44,"message":"media_ids parameter is invalid."}]}&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Getting Infinity issues from api response</title><link>https://community.appian.com/thread/66270?ContentTypeID=1</link><pubDate>Thu, 02 May 2019 08:41:10 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7964081f-a04f-4613-9bac-110fb88957b0</guid><dc:creator>Krishna Chaitanya Mallavarapu</dc:creator><description>&lt;p&gt;pass value like&amp;nbsp;&lt;span&gt;7.105114e+17&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Getting Infinity issues from api response</title><link>https://community.appian.com/thread/66269?ContentTypeID=1</link><pubDate>Thu, 02 May 2019 08:39:50 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:843ab9b6-8fe6-4d46-a139-eaa195e18c6b</guid><dc:creator>bhanuprakash1303</dc:creator><description>&lt;p&gt;when i used&amp;nbsp; tostring(local!data.media_id_string), but value is coming like &amp;quot;&lt;span&gt;710511363345354753&amp;quot; . when I pass this value to another api as a request .the value is {id:&amp;quot;710511363345354753&amp;quot;} like this. so , i got a error invalid id..when i pass only value without quote ..now it is working fine..&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I tired to remove the quote(&amp;quot;&amp;quot;), in this value..it is not coming..can you please help me in this atleast.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Getting Infinity issues from api response</title><link>https://community.appian.com/thread/66268?ContentTypeID=1</link><pubDate>Thu, 02 May 2019 08:34:22 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:8e3e7dfc-b43a-41e1-8bff-5cb4ac6f3e11</guid><dc:creator>bhanuprakash1303</dc:creator><description>&lt;p&gt;when I used todecimal to&amp;nbsp;&lt;span&gt;media_id_string, output coming like &amp;quot;7.105114e+17&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Getting Infinity issues from api response</title><link>https://community.appian.com/thread/66267?ContentTypeID=1</link><pubDate>Thu, 02 May 2019 08:31:54 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a209363d-31c7-439e-baf8-fe5dc962cbc3</guid><dc:creator>Krishna Chaitanya Mallavarapu</dc:creator><description>&lt;p&gt;instead of using&amp;nbsp;&lt;span&gt;media_id use&amp;nbsp;media_id_string and then convert string value to&amp;nbsp;decimal&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;load(&lt;br /&gt; local!data: {&lt;br /&gt; &amp;quot;media_id&amp;quot;: 710511363345354753,&lt;br /&gt; &amp;quot;media_id_string&amp;quot;: &amp;quot;710511363345354753&amp;quot;,&lt;br /&gt; &amp;quot;size&amp;quot;: 11065,&lt;br /&gt; &amp;quot;expires_after_secs&amp;quot;: 86400,&lt;br /&gt; &amp;quot;image&amp;quot;: {&lt;br /&gt; &amp;quot;image_type&amp;quot;: &amp;quot;image/jpeg&amp;quot;,&lt;br /&gt; &amp;quot;w&amp;quot;: 800,&lt;br /&gt; &amp;quot;h&amp;quot;: 320&lt;br /&gt; }&lt;br /&gt; },&lt;br /&gt; todecimal(&lt;br /&gt; local!data.media_id_string&lt;br /&gt; )&lt;br /&gt;)&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>