<?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: json library invalid character in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/json-library-unexpected-character/m-p/504499#M135012</link>
    <description>&lt;P&gt;123 is the opening curly bracket {.&lt;/P&gt;
&lt;P&gt;So that's a valid character.&lt;/P&gt;
&lt;P&gt;The issue must therefore be the structure of the JSON file.&lt;/P&gt;
&lt;P&gt;Save the file as a text file and look at how it is broken when opening a new { } block at that position.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've changed to thread tile to&amp;nbsp;&lt;EM&gt;&amp;nbsp;json library&amp;nbsp;unexpected character&lt;/EM&gt; from&amp;nbsp;&amp;nbsp;&lt;EM&gt;json library&amp;nbsp;invalid character&lt;/EM&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 15 Oct 2018 21:31:18 GMT</pubDate>
    <dc:creator>ChrisNZ</dc:creator>
    <dc:date>2018-10-15T21:31:18Z</dc:date>
    <item>
      <title>json library unexpected character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/json-library-unexpected-character/m-p/503789#M134679</link>
      <description>&lt;P&gt;I'm trying to import the FEMA disaster areas using their JSON api.&amp;nbsp; Proc HTTP completes with status code 200 (normal) but the libname statement returns an error that i can't trace.&amp;nbsp; Column 567 is in the middle of the first record and doesn't appear to have invalid characters.&amp;nbsp; Any ideas on where to look?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ERROR: Invalid JSON in input near line 1 column 567: Unexpected characters found after valid JSON text.&lt;BR /&gt;ERROR: Error in the LIBNAME statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename resp temp;
proc http 
	url = "https://www.fema.gov/api/open/v1/DisasterDeclarationsSummaries.json" 
	method = "get" 
	out = resp; 
run;
libname res json fileref=resp;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 15 Oct 2018 21:31:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/json-library-unexpected-character/m-p/503789#M134679</guid>
      <dc:creator>DBailey</dc:creator>
      <dc:date>2018-10-15T21:31:52Z</dc:date>
    </item>
    <item>
      <title>Re: json library invalid character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/json-library-unexpected-character/m-p/503969#M134791</link>
      <description>&lt;P&gt;What does this generate?&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;data _null_;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; infile RESP lrecl=600;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; input;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; A= rank(char(_infile_,567)) ;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; putlog '~' _N_ '~' A '~' ;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; if _N_=10 then stop;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;run;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 13 Oct 2018 03:22:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/json-library-unexpected-character/m-p/503969#M134791</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2018-10-13T03:22:24Z</dc:date>
    </item>
    <item>
      <title>Re: json library invalid character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/json-library-unexpected-character/m-p/504292#M134931</link>
      <description>&lt;P&gt;~1 ~123 ~&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Oct 2018 13:24:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/json-library-unexpected-character/m-p/504292#M134931</guid>
      <dc:creator>DBailey</dc:creator>
      <dc:date>2018-10-15T13:24:58Z</dc:date>
    </item>
    <item>
      <title>Re: json library invalid character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/json-library-unexpected-character/m-p/504499#M135012</link>
      <description>&lt;P&gt;123 is the opening curly bracket {.&lt;/P&gt;
&lt;P&gt;So that's a valid character.&lt;/P&gt;
&lt;P&gt;The issue must therefore be the structure of the JSON file.&lt;/P&gt;
&lt;P&gt;Save the file as a text file and look at how it is broken when opening a new { } block at that position.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've changed to thread tile to&amp;nbsp;&lt;EM&gt;&amp;nbsp;json library&amp;nbsp;unexpected character&lt;/EM&gt; from&amp;nbsp;&amp;nbsp;&lt;EM&gt;json library&amp;nbsp;invalid character&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Oct 2018 21:31:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/json-library-unexpected-character/m-p/504499#M135012</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2018-10-15T21:31:18Z</dc:date>
    </item>
    <item>
      <title>Re: json library invalid character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/json-library-unexpected-character/m-p/504505#M135013</link>
      <description>&lt;P&gt;I had a look.&lt;/P&gt;
&lt;P&gt;This file is a suite of { } groups, with no overall &lt;SPAN&gt;structure&lt;/SPAN&gt;. It's invalid jason.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You need to add an overall structure&amp;nbsp;to go from&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;{"disasterNumber":1}{"disasterNumber":3}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;to something like:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;{"event1":&lt;/FONT&gt;&lt;/STRONG&gt;{"disasterNumber":1}&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;,&lt;/FONT&gt;&lt;FONT color="#0000FF"&gt;"event2":&lt;/FONT&gt;&lt;/STRONG&gt;{"disasterNumber":3}&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;}&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Oct 2018 22:02:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/json-library-unexpected-character/m-p/504505#M135013</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2018-10-15T22:02:52Z</dc:date>
    </item>
  </channel>
</rss>

