Hey Tom, yes I'm using the libname statement, but it keeps erroring out, at first it was hidden characters which I used Notepadd++ to find and then used the data step replace with a blank, then was the escape characters. This file is UTF-8 I'm using SAS viya 3.5/sas studio on unix server.
In notepad++ I've been going to each illegal error and seeing what it looks like, finding the character causing the issue and adding it to my replace code, now it appears to be quotes. the code in the notepad++ (which I set the language to json) also recognizes and issue the code is yellow (apologize hard to see). If I then search for next quote I get to here (second image) where it should be parsing at the comma, "user": field but it has an extra quote, If I remove that quote, it continues parsing until I run into the same issue.
The json is 680mb which is the smaller of 100's of jsons I need to parse, some are as large as 10gb, so at some point won't even be able to try and view it with notepad++
error:
89 filename fixmap "/mnt/SAS/Shared Services/SAS_Datasets/tempfiles/bob.map";
90 filename bobby "/mnt/SAS/Shared Services/SAS_Datasets/tempfiles/tempjson/ALERT_JSON_20231214_1.json" LRECL=1000000000
90 ! encoding='utf-8';
91 libname myjson json fileref=bobby map=fixmap automap=create ordinalcount=all;
NOTE: JSON data is only read once. To read the JSON again, reassign the JSON LIBNAME.
ERROR: Invalid JSON in input near line 1 column 6709058: Encountered an illegal character.
ERROR: Error in the LIBNAME statement.
I've attached a sample of the json
... View more