<?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 Re: Problem with Census API and SAS JSON library in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-Census-API-and-SAS-JSON-library/m-p/547301#M151635</link>
    <description>&lt;P&gt;So the Census doesn't have properly formed JSON code. Somehow I'm not surprised.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;EDIT: I just found this on the Census API Developer page: "The Census uses a nonstandard version of JSON that is streamlined."&lt;/P&gt;</description>
    <pubDate>Fri, 29 Mar 2019 18:46:25 GMT</pubDate>
    <dc:creator>ebowen</dc:creator>
    <dc:date>2019-03-29T18:46:25Z</dc:date>
    <item>
      <title>Problem with Census API and SAS JSON library</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-Census-API-and-SAS-JSON-library/m-p/547283#M151629</link>
      <description>&lt;P&gt;Hello! I'm trying to access some Census data using their API, and I'm having a problem getting the proper field names. I'm able to download the data, but the field names end up as the first observation in the dataset. When I look at the API itself, the field names are listed as the "0" observation. I can't figure out how to get SAS to recognize that the first observation is actually the field names. Here's my code so far:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename cns temp;
proc http
   url='https://api.census.gov/data/2017/acs/acs5?get=NAME,group(B23025)&amp;amp;for=county:*'
   method= "GET"
   out=cns;
run;
libname census JSON fileref=cns;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Thanks for your help!&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2019 18:01:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-with-Census-API-and-SAS-JSON-library/m-p/547283#M151629</guid>
      <dc:creator>ebowen</dc:creator>
      <dc:date>2019-03-29T18:01:17Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Census API and SAS JSON library</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-Census-API-and-SAS-JSON-library/m-p/547297#M151633</link>
      <description>&lt;P&gt;Looks like they just wrapped a CSV file into json like syntax.&lt;/P&gt;
&lt;P&gt;Why not just reverse the process?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename csv temp;
data _null_;
  set census.root;
  file csv dsd ;
  put (_all_) (+0);
run;
proc import datafile=csv dbms=csv out=census replace;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 29 Mar 2019 18:32:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-with-Census-API-and-SAS-JSON-library/m-p/547297#M151633</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-03-29T18:32:55Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Census API and SAS JSON library</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-Census-API-and-SAS-JSON-library/m-p/547301#M151635</link>
      <description>&lt;P&gt;So the Census doesn't have properly formed JSON code. Somehow I'm not surprised.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;EDIT: I just found this on the Census API Developer page: "The Census uses a nonstandard version of JSON that is streamlined."&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2019 18:46:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-with-Census-API-and-SAS-JSON-library/m-p/547301#M151635</guid>
      <dc:creator>ebowen</dc:creator>
      <dc:date>2019-03-29T18:46:25Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Census API and SAS JSON library</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-Census-API-and-SAS-JSON-library/m-p/547304#M151638</link>
      <description>&lt;P&gt;Reminds of a story from when everyone was insisting that data transfers had to use XML.&amp;nbsp; For an existing system that was using CSV to transfer the files they just wrapped that CSV file as CDATA object in an XML. Problem solved &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2019 18:46:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-with-Census-API-and-SAS-JSON-library/m-p/547304#M151638</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-03-29T18:46:56Z</dc:date>
    </item>
  </channel>
</rss>

