Hi I'm trying to convert json from a rest api to a dataset. In the JSON data there is an emoji, which SAS, or the proc json routine is unable to handle. I've played with idea of getting the data with python (don't know why), but not sure if python will handle this better. Example code: filename input "testjson.json";
%let jsondata = '{"num_records": 1, "data": [[1, "texttexttext \ud83d\udc4d\ud83c\udffb"]], "data_type": "json"}';
libname posts json fileref=input;
proc datasets lib=posts ; quit;
The data array includes more attributes, but libname statement fails on the 4 encoded values at the end of the provided example and program throws the following error. The field is provided by users so there may be more... ERROR: Invalid JSON in input near line 1 column 71: Some code points did not transcode.
ERROR: Error in the LIBNAME statement. Is it possible to handle this in some way besides getting the developer to change their API (probably not feasible)?
... View more