Hello I was trying to run the code from the paper Creating and Controlling JSON Output with PROC JSON page 8 and getting an error which I am not able to comprehend. The error is "ERROR: A string is required at this point in the text so that an object key may be emitted." I am reproducing the log with code below. Wondering if some one can help?
28 proc json out="nested_output.json" pretty nosastags ;
29 write open array;
30 write open object;
31 write values "Title" "Employees";
32 write values "Description" "Information about employees about the company";
33
34 write open array ;
ERROR: A string is required at this point in the text so that an object key may be emitted.
35 export employees / fmtdatetime;
36 write close;
37
38 write close;
39
40 write close ;
41 run;
ERROR: Due to the previous error, the JSON output file is incomplete and invalid, or in some cases, unable to be created. If
created, the JSON output file is retained so that you can review it to help determine the cause of the error.
......
NOTE: The SAS System stopped processing this step because of errors.
The content of the json file are as follows
[
{
"Title": "Employees",
"Description": "Information about employees about the company"
... View more