Thank you, Tom, for your propsosed solution!
Unfortunately, a more general solution is needed.
The content of the presented JSON string is only a part of a much, much larger file: "https://data.arbetsformedlingen.se/annonser/historiska/2020.zip". This is the file I need to read and I do not know how many points that will not transcode. Thus it doesn't seem to be a good way of working to change parts of the string for something else every time a Javascript Escape is not recognized.
Strangely enough, SAS seems to have the capability to recognize this Javascript Escape if you read it in through a put statement.
data _null_;
file input;
put '{"num_records": 1, "data": [[1, "\ud83d\ude80"]], "data_type": "json"}';
run;
libname input json fileref=input;
proc print data = posts.data;
run;
With the following result.
Obs
ordinal_root
ordinal_data
element1
element2
1
1
1
1
🚀
Do you think one could use this to build a more general solution for reading JSON files containing Java Script Escapes?
... View more