Hello everyone! I'm trying to read a json file i created while calling an API made by us. The file is created fine but when i try to use the LIBNAME JSON Engine, it give me the following error message : ERROR: JSON incorrect dans input à côté de la ligne 1 colonne 85993: Some code points did not transcode. I did some research about "some code point did not transcode" and from what i've read, it's because the json file i'm trying to read is encoded in UTF-8; wich is true. I've also read that i could put ENCONDING="UTF-8" (read example with UTF-8 in lowercase) : Got the same error message but not the same column number : ERROR: JSON incorrect dans input à côté de la ligne 1 colonne 85959: Some code points did not transcode. Here a sample from the code i'm using : This run in a macro wich loop calling the API a few times :
//Setting the filename to write down the JSON file (not actual code; explaining the variables uses)
&api_call contains the url to the API
&fic_api_call contains the name of the file written
&boucle contains the loop number at that time being
FILENAME users "&api_call.&fic_api_call._&boucle..json";
//Calling the API and creating the users files (same as above, not actual code)
&list contains a list of argument i'm giving the API
PROC HTTP
METHOD="GET"
CT="application/JSON"
URL="&url.&list."
OUT=users;
RUN;
After the macro :
(not the same code as in my program but i'm setting the FILENAME this way)
FILENAME data "x:\api_call\file.json" ENCODING="UTF-8"
LIBNAME data JSON FILEREF=data I've also read the opening sas 9.4 with unicode support work. Yes, it's working. But we're going to run this code/program on a SAS-SERVER wich is not set with the UFT-8 enconding. So, need some help reading the JSON file 🙂 Thanks!!
... View more