<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Fetching the Data using API in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Fetching-the-Data-using-API/m-p/797959#M313743</link>
    <description>&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;we are fetching the data though the API. We are passing parameters in the below structure and response is getting in Json format.&lt;BR /&gt;But the problem is it storing in a string format by including extra double quote ("). duo to this we are not able to do the mapping.&lt;BR /&gt;we tried to remove the quote(") manually to verify is the required output getting. but it is throwing the error. But can able to do using java&lt;BR /&gt;scrpit .&lt;/P&gt;</description>
    <pubDate>Wed, 23 Feb 2022 08:34:46 GMT</pubDate>
    <dc:creator>harigottala0</dc:creator>
    <dc:date>2022-02-23T08:34:46Z</dc:date>
    <item>
      <title>Fetching the Data using API</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fetching-the-Data-using-API/m-p/797959#M313743</link>
      <description>&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;we are fetching the data though the API. We are passing parameters in the below structure and response is getting in Json format.&lt;BR /&gt;But the problem is it storing in a string format by including extra double quote ("). duo to this we are not able to do the mapping.&lt;BR /&gt;we tried to remove the quote(") manually to verify is the required output getting. but it is throwing the error. But can able to do using java&lt;BR /&gt;scrpit .&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2022 08:34:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fetching-the-Data-using-API/m-p/797959#M313743</guid>
      <dc:creator>harigottala0</dc:creator>
      <dc:date>2022-02-23T08:34:46Z</dc:date>
    </item>
    <item>
      <title>Re: Fetching the Data using API</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fetching-the-Data-using-API/m-p/798008#M313766</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/122556"&gt;@harigottala0&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you saying that the JSON you get back from the API isn't actually valid JSON? You can test quickly by putting in the log:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;data _null_;
 rc=jsonpp('resp','log');
run;&lt;/LI-CODE&gt;
&lt;P&gt;Or paste the JSON into one of the many free "JSON pretty print" sites around the internet. This will help validate the JSON.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it's not valid JSON, then ideally the best course is to try and configure the service to provide valid JSON -- otherwise it's not much use as a RESTful service. But if that's not possible, maybe there is a way to post-process the JSON in SAS to fix it. We would need to see an example of the JSON response to advise on that.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2022 12:39:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fetching-the-Data-using-API/m-p/798008#M313766</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2022-02-23T12:39:10Z</dc:date>
    </item>
    <item>
      <title>Re: Fetching the Data using API</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fetching-the-Data-using-API/m-p/798010#M313768</link>
      <description>&lt;P&gt;Or actually maybe you need a better way to form your input JSON. Try this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;filename input temp;
data _null_;
   file input;
   infile datalines;
   input;
   put _infile_;
datalines;
{
  "xxxxx": {
    "Mode": "x",   
    "Service_Name": "xxxxx",
    "P1": "",
    "P2": "",
    "P3": "",
    "P4": "",
    "5": ""
  }
}
;
run;

data _null_;
 rc=jsonpp('input','log');
run;&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 23 Feb 2022 12:46:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fetching-the-Data-using-API/m-p/798010#M313768</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2022-02-23T12:46:35Z</dc:date>
    </item>
  </channel>
</rss>

