<?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: Convert JSON file into SAS readable dataset in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Convert-JSON-file-into-SAS-readable-dataset/m-p/772583#M245326</link>
    <description>Have you tried saving the file to a text file/JSON file and then using libname JSON?&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/sasdummy/2016/12/02/json-libname-engine-sas/" target="_blank"&gt;https://blogs.sas.com/content/sasdummy/2016/12/02/json-libname-engine-sas/&lt;/A&gt;&lt;BR /&gt;</description>
    <pubDate>Wed, 06 Oct 2021 21:44:22 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2021-10-06T21:44:22Z</dc:date>
    <item>
      <title>Convert JSON file into SAS readable dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-JSON-file-into-SAS-readable-dataset/m-p/772582#M245325</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have the JSON file and I need to convert this JSON file, that is in text format, into a SAS dataset.&amp;nbsp; Attached is the example JSON text file. Any help or suggestion is appreciated.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Schema in the table:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;_id&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;barcode&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;brandCode&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;category&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;categoryCode&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;cpg&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;topBrand&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;name&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sample:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;{"_id":{"$oid":"601ac115be37ce2ead437551"},"barcode":"511111019862","category":"Baking","categoryCode":"BAKING","cpg":{"$id":{"$oid":"601ac114be37ce2ead437550"},"$ref":"Cogs"},"name":"test brand @1612366101024","topBrand":false}&lt;BR /&gt;{"_id:{"$oid":"601c5460be37ce2ead43755f"},"barcode":"511111519928","brandCode":"STARBUCKS","category":"Beverages","categoryCode":"BEVERAGES","cpg":{"$id":{"$oid":"5332f5fbe4b03c9a25efd0ba"},"$ref":"Cogs"},"name":"Starbucks","topBrand":false}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Oct 2021 21:38:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-JSON-file-into-SAS-readable-dataset/m-p/772582#M245325</guid>
      <dc:creator>yichentian226</dc:creator>
      <dc:date>2021-10-06T21:38:07Z</dc:date>
    </item>
    <item>
      <title>Re: Convert JSON file into SAS readable dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-JSON-file-into-SAS-readable-dataset/m-p/772583#M245326</link>
      <description>Have you tried saving the file to a text file/JSON file and then using libname JSON?&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/sasdummy/2016/12/02/json-libname-engine-sas/" target="_blank"&gt;https://blogs.sas.com/content/sasdummy/2016/12/02/json-libname-engine-sas/&lt;/A&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 06 Oct 2021 21:44:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-JSON-file-into-SAS-readable-dataset/m-p/772583#M245326</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-10-06T21:44:22Z</dc:date>
    </item>
    <item>
      <title>Re: Convert JSON file into SAS readable dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-JSON-file-into-SAS-readable-dataset/m-p/772588#M245328</link>
      <description>&lt;P&gt;Thanks for the reply. I read that article earlier and got error while trying to run it myself. I guess I wasn't understanding the "proc http&lt;BR /&gt;url= "&amp;amp;fullurl.", in this case will I need to save the file in a web path? My file is saved as txt on the desktop.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Oct 2021 22:12:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-JSON-file-into-SAS-readable-dataset/m-p/772588#M245328</guid>
      <dc:creator>yichentian226</dc:creator>
      <dc:date>2021-10-06T22:12:21Z</dc:date>
    </item>
  </channel>
</rss>

